From: Michael Orlitzky Date: Wed, 7 Sep 2011 23:16:39 +0000 (-0400) Subject: Add the 'drop_z' function. X-Git-Tag: 0.0.1~146 X-Git-Url: http://gitweb.michael.orlitzky.com/?p=spline3.git;a=commitdiff_plain;h=f543f3bbc870d0b77cb9b5ad652963af9a70fbf3 Add the 'drop_z' function. --- diff --git a/src/Values.hs b/src/Values.hs index 614fb75..d7ede83 100644 --- a/src/Values.hs +++ b/src/Values.hs @@ -87,3 +87,8 @@ zoom_shape (sfx, sfy, sfz) sh = z' = z * sfz in (Z :. x' :. y' :. z') + + +drop_z :: DIM3 -> DIM2 +drop_z (Z :. 1 :. y :. x) = (Z :. y :. x) +drop_z _ = error "can't drop the z-dimension unless its size is 1"