Index: trunk/psLib/src/math/psHistogram.c
===================================================================
--- trunk/psLib/src/math/psHistogram.c	(revision 11759)
+++ trunk/psLib/src/math/psHistogram.c	(revision 12434)
@@ -5,6 +5,6 @@
  *  @author GLG (MHPCC), EAM (IfA)
  *
- *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-02-13 03:01:24 $
+ *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-03-14 02:36:28 $
  *
  *  Copyright 2006 IfA, University of Hawaii
@@ -306,18 +306,17 @@
                     // correct bin number requires a bit more work.
                     tmpScalar.data.F32 = inF32->data.F32[i];
-                    binNum = p_psVectorBinDisect( *(psVector* *)&out->bounds, &tmpScalar);
-                    if (binNum < 0) {
-                        psLogMsg(__func__, PS_LOG_WARN,
-                                 "WARNING: psVectorHistogram(): element outside histogram bounds.\n");
-                    } else {
-                        if (errorsF32 != NULL) {
-                            if (!UpdateHistogramBins(binNum, out, inF32->data.F32[i], errors->data.F32[i])) {
-                                psLogMsg(__func__, PS_LOG_WARN, "WARNING: Failed to update the histogram "
-                                         "bins with the errors vector.\n");
-                            }
-                        } else {
-                            out->nums->data.F32[binNum] += 1.0;
-                        }
-                    }
+		    psVectorBinaryDisectResult result;
+                    binNum = psVectorBinaryDisect(&result, out->bounds, &tmpScalar);
+		    if (result != PS_BINARY_DISECT_PASS) {
+			continue;
+		    }
+		    if (errorsF32 != NULL) {
+			if (!UpdateHistogramBins(binNum, out, inF32->data.F32[i], errors->data.F32[i])) {
+			    psLogMsg(__func__, PS_LOG_WARN, "WARNING: Failed to update the histogram "
+				     "bins with the errors vector.\n");
+			}
+		    } else {
+			out->nums->data.F32[binNum] += 1.0;
+		    }
                 }
             }
