]> gitweb.michael.orlitzky.com - spline3.git/blobdiff - src/Values.hs
Add the 'drop_z' function.
[spline3.git] / src / Values.hs
index 614fb75991359ff8f47c80969721a5bb75598d51..d7ede8399391b3229a1c7a6d36f04fececd3674b 100644 (file)
@@ -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"