X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FGrid.hs;h=7325d2b5b0968f5860834e21b809e9b67995dba8;hb=29ffefd3c892f38eee96fdd672ceab4d0454cd90;hp=8bf83828e9f23a97de57360ffeded92ebb92ccd2;hpb=000641ad447f7b841157cf02386edfdd368ab1ea;p=spline3.git diff --git a/src/Grid.hs b/src/Grid.hs index 8bf8382..7325d2b 100644 --- a/src/Grid.hs +++ b/src/Grid.hs @@ -96,6 +96,7 @@ calculate_containing_cube_coordinate g coord -- returns cube #1 if we would have returned cube #0 and cube #1 -- exists. | coord == offset && (xsize > 0 && ysize > 0 && zsize > 0) = 1 + | coord < offset = 0 | otherwise = (ceiling ( (coord + offset) / cube_width )) - 1 where (xsize, ysize, zsize) = dims (function_values g)