From c3285bb69e52bd4fc2aca89b056505553149e9da Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 3 Oct 2011 20:04:03 -0400 Subject: [PATCH] Use a sensible definition for the all volumes positive test. --- src/Cube.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 2.43.2