From 29ffefd3c892f38eee96fdd672ceab4d0454cd90 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 2 Sep 2011 09:13:55 -0400 Subject: [PATCH] Add another guard on calculate_containing_cube_coordinate. --- src/Grid.hs | 1 + 1 file changed, 1 insertion(+) 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) -- 2.43.2