From cdea5a8631ae108b3b6520ba02642d99112806f7 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 29 Aug 2011 19:02:31 -0400 Subject: [PATCH] Modify the Values module to use ScaleFactors instead of Ints. --- src/Values.hs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Values.hs b/src/Values.hs index 3833135..dc45a3f 100644 --- a/src/Values.hs +++ b/src/Values.hs @@ -23,6 +23,9 @@ import System.FilePath () import Test.QuickCheck (Arbitrary(..), Gen) +import ScaleFactor + + type Values1D = Array DIM1 Double type Values2D = Array DIM2 Double type Values3D = Array DIM3 Double @@ -82,11 +85,11 @@ idx v3d i j k = shape = (Z :. i :. j :. k) -zoom_shape :: Int -> DIM3 -> DIM3 -zoom_shape scale_factor sh = +zoom_shape :: ScaleFactor -> DIM3 -> DIM3 +zoom_shape (sfx, sfy, sfz) sh = let (Z :. x :. y :. z) = sh - x' = x * scale_factor - y' = y * scale_factor - z' = z * scale_factor + x' = x * sfx + y' = y * sfy + z' = z * sfz in (Z :. x' :. y' :. z') -- 2.44.2