From f543f3bbc870d0b77cb9b5ad652963af9a70fbf3 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 7 Sep 2011 19:16:39 -0400 Subject: [PATCH] Add the 'drop_z' function. --- src/Values.hs | 5 +++++ 1 file changed, 5 insertions(+) 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" -- 2.43.2