X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FGrid.hs;h=7325d2b5b0968f5860834e21b809e9b67995dba8;hb=f902a4d6b47c61ac1ce06ae837d94bda9d2471be;hp=8bf83828e9f23a97de57360ffeded92ebb92ccd2;hpb=173d34c0d529830efeab39b7cca9a03856514469;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)