X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FCube.hs;h=6263d2e32a331ffe971b61ba78eed466fd71c04d;hb=603d9155a29bfbc353b42a6c880edce224626a16;hp=2878eb06b76ffb54c0685de2543457faf3d8db29;hpb=a7f5c0b286ba29cdd586f418638e9ab4a406bf97;p=spline3.git diff --git a/src/Cube.hs b/src/Cube.hs index 2878eb0..6263d2e 100644 --- a/src/Cube.hs +++ b/src/Cube.hs @@ -116,13 +116,13 @@ instance ThreeDimensional Cube where -- | It's easy to tell if a point is within a cube; just make sure -- that it falls on the proper side of each of the cube's faces. - contains_point c p - | (x_coord p) < (xmin c) = False - | (x_coord p) > (xmax c) = False - | (y_coord p) < (ymin c) = False - | (y_coord p) > (ymax c) = False - | (z_coord p) < (zmin c) = False - | (z_coord p) > (zmax c) = False + contains_point c (x, y, z) + | x < (xmin c) = False + | x > (xmax c) = False + | y < (ymin c) = False + | y > (ymax c) = False + | z < (zmin c) = False + | z > (zmax c) = False | otherwise = True