+ /**
+ * @param inX x value of point
+ * @return minimum wrapped value
+ */
+ private static final double getMinXDist(double inX)
+ {
+ // TODO: Can use some kind of floor here?
+ return Math.min(Math.min(Math.abs(inX), Math.abs(inX-1.0)), Math.abs(inX+1.0));
+ }
+