--- /dev/null
+module Comparisons
+where
+
+
+almost_equals :: Double -> Double -> Bool
+almost_equals x y = (abs (x - y)) < 0.0001
+
+infix 4 ~=
+(~=) :: Double -> Double -> Bool
+(~=) = almost_equals
import Test.HUnit
import Test.QuickCheck
+import Comparisons
import Cube
import Point
import Tests.Cube()
rnd_v3 <- arbitrary :: Gen Point
return (Tetrahedron rnd_c0 rnd_v0 rnd_v1 rnd_v2 rnd_v3)
-almost_equals :: Double -> Double -> Bool
-almost_equals x y = (abs (x - y)) < 0.0001
-
-(~=) :: Double -> Double -> Bool
-(~=) = almost_equals
-
-
-- HUnit Tests
-- Since p0, p1, p2 are in clockwise order, we expect the volume here