]> gitweb.michael.orlitzky.com - spline3.git/blobdiff - src/Values.hs
Replace TypeSynonymInstances with FlexibleInstances (makes GHC 7.2.1 happy) everywhere.
[spline3.git] / src / Values.hs
index a33bbba56d3eef9da970d845de285af4c39ac39d..0ef8410813e80729e09a0af3ec4a162bd7868814 100644 (file)
@@ -1,4 +1,4 @@
-{-# LANGUAGE TypeSynonymInstances #-}
+{-# LANGUAGE FlexibleInstances #-}
 
 module Values
 where
@@ -79,4 +79,14 @@ idx v3d i j k =
     index v3d shape
     where
       shape :: DIM3
-      shape = (Z :. i :. j :. k)
+      shape = (Z :. k :. j :. i)
+
+
+zoom_shape :: Int -> DIM3 -> DIM3
+zoom_shape scale_factor sh =
+    let (Z :. x :. y :. z) = sh
+        x' = x * scale_factor
+        y' = y * scale_factor
+        z' = z * scale_factor
+    in
+      (Z :. x' :. y' :. z')