X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FValues.hs;h=d7ede8399391b3229a1c7a6d36f04fececd3674b;hb=de6759db987b07efdd5bf1f238f2d0d9eb8d3d4c;hp=614fb75991359ff8f47c80969721a5bb75598d51;hpb=c93a9fd2d3623feb4e87678685c71a8940e98869;p=spline3.git 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"