]> gitweb.michael.orlitzky.com - spline3.git/blobdiff - src/Tetrahedron.hs
Begin writing the precomputed_volume feature again.
[spline3.git] / src / Tetrahedron.hs
index 95233e008bfa0efe4fb69f20a4485b52f8e53b20..eef16566352fdcaedf7d2f0455d65b05a29a8c68 100644 (file)
@@ -17,7 +17,8 @@ data Tetrahedron = Tetrahedron { fv :: FunctionValues,
                                  v0 :: Point,
                                  v1 :: Point,
                                  v2 :: Point,
-                                 v3 :: Point }
+                                 v3 :: Point,
+                                 precomputed_volume :: Double }
                    deriving (Eq)
 
 
@@ -28,7 +29,8 @@ instance Arbitrary Tetrahedron where
       rnd_v2 <- arbitrary :: Gen Point
       rnd_v3 <- arbitrary :: Gen Point
       rnd_fv <- arbitrary :: Gen FunctionValues
-      return (Tetrahedron rnd_fv rnd_v0 rnd_v1 rnd_v2 rnd_v3)
+      rnd_vol <- arbitrary :: Gen Double
+      return (Tetrahedron rnd_fv rnd_v0 rnd_v1 rnd_v2 rnd_v3 rnd_vol)
 
 
 instance Show Tetrahedron where