]> gitweb.michael.orlitzky.com - spline3.git/blobdiff - src/Cube.hs
Don't output function values when 'show'ing a cube.
[spline3.git] / src / Cube.hs
index 3a997a4ab25e917eccd7e9e18587589b7bc98a32..6e67d4cd4d6d3c7311a7c095e4b43be9387ba69b 100644 (file)
@@ -64,8 +64,7 @@ instance Show Cube where
         " ymin: " ++ (show (ymin cube)) ++ "\n" ++
         " ymax: " ++ (show (ymax cube)) ++ "\n" ++
         " zmin: " ++ (show (zmin cube)) ++ "\n" ++
-        " zmax: " ++ (show (zmax cube)) ++ "\n" ++
-        " fv: " ++ (show (Cube.fv cube)) ++ "\n"
+        " zmax: " ++ (show (zmax cube)) ++ "\n"
         where
           subscript =
               (show (i cube)) ++ "," ++ (show (j cube)) ++ "," ++ (show (k cube))
@@ -665,15 +664,15 @@ prop_opposite_octant_tetrahedra_disjoint6 cube =
 
 
 -- | Since the grid size is necessarily positive, all tetrahedra
---   (which comprise cubes of positive volume) must have positive volume
---   as well.
+--   (which comprise cubes of positive volume) must have positive
+--   volume as well.
 prop_all_volumes_positive :: Cube -> Bool
 prop_all_volumes_positive cube =
-    null nonpositive_volumes
+    all (>= 0) volumes
     where
       ts = tetrahedra cube
       volumes = map volume ts
-      nonpositive_volumes = filter (<= 0) volumes
+
 
 -- | In fact, since all of the tetrahedra are identical, we should
 --   already know their volumes. There's 24 tetrahedra to a cube, so