From: Michael Orlitzky Date: Thu, 28 Apr 2011 01:50:35 +0000 (-0400) Subject: Eta reduce the reverse_cube function. X-Git-Tag: 0.0.1~362 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=551cd4237e70d474ac00125644157f506c367ed5;p=spline3.git Eta reduce the reverse_cube function. Add a comment to the reverse_cube function. Remove some redundant parentheses. --- diff --git a/src/Cube.hs b/src/Cube.hs index 882233f..d741f49 100644 --- a/src/Cube.hs +++ b/src/Cube.hs @@ -105,9 +105,9 @@ instance ThreeDimensional Cube where i' = fromIntegral (i c) :: Double j' = fromIntegral (j c) :: Double k' = fromIntegral (k c) :: Double - x = (delta * i') - y = (delta * j') - z = (delta * k') + x = delta * i' + y = delta * j' + z = delta * k' contains_point c p | (x_coord p) < (xmin c) = False @@ -146,8 +146,9 @@ instance Fractional Cube where fromRational q = empty_cube { datum = fromRational q } +-- | Constructs a cube, switching the i and k axes. reverse_cube :: Grid -> Int -> Int -> Int -> Double -> Cube -reverse_cube g k' j' i' datum' = Cube g i' j' k' datum' +reverse_cube g k' j' i' = Cube g i' j' k' cube_at :: Grid -> Int -> Int -> Int -> Cube