import Test.QuickCheck (Arbitrary(..), Gen)
import Cardinal
+import Comparisons (nearly_ge)
import FunctionValues
import Misc (factorial)
import Point
instance ThreeDimensional Tetrahedron where
center t = ((v0 t) + (v1 t) + (v2 t) + (v3 t)) `scale` (1/4)
contains_point t p =
- (b0 t p) >= 0 && (b1 t p) >= 0 && (b2 t p) >= 0 && (b3 t p) >= 0
+ (b0 t p) `nearly_ge` 0 &&
+ (b1 t p) `nearly_ge` 0 &&
+ (b2 t p) `nearly_ge` 0 &&
+ (b3 t p) `nearly_ge` 0
polynomial :: Tetrahedron -> (RealFunction Point)