From: Michael Orlitzky Date: Tue, 4 Oct 2011 00:04:03 +0000 (-0400) Subject: Use a sensible definition for the all volumes positive test. X-Git-Tag: 0.0.1~112 X-Git-Url: http://gitweb.michael.orlitzky.com/?p=spline3.git;a=commitdiff_plain;h=c3285bb69e52bd4fc2aca89b056505553149e9da Use a sensible definition for the all volumes positive test. --- diff --git a/src/Cube.hs b/src/Cube.hs index 3a997a4..1144a13 100644 --- a/src/Cube.hs +++ b/src/Cube.hs @@ -665,15 +665,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