CDMS/src/CDMS/Partridge/ImageComparison
diff -u -r1.2 -r1.3
--- PixelArray.java 5 Sep 2010 20:20:10 -0000 1.2
+++ PixelArray.java 5 Sep 2010 20:40:03 -0000 1.3
@@ -88,7 +88,7 @@
* @return row number
*/
public int getRow(double y) {
- int ipix = (int) Math.ceil((y - _yc) / _dy + _nrow / 2.);
+ int ipix = (int) Math.floor((y - _yc) / _dy + _nrow / 2.);
if (ipix < 0 || ipix >= _nrow) throw new RuntimeException("Row outside pixel array for y = "+y);
return ipix;
}
@@ -111,7 +111,7 @@
* @return column number
*/
public int getCol(double x) {
- int ipix = (int) Math.ceil((x - _xc) / _dx + _ncol / 2.);
+ int ipix = (int) Math.floor((x - _xc) / _dx + _ncol / 2.);
if (ipix < 0 || ipix >= _ncol) throw new RuntimeException("Col outside pixel array for x = "+x);
return ipix;
}