X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FTetrahedron.hs;h=2a4227a7f1bbee2d10a99baa66a07904e1e16c15;hb=c02ac1bf9295e4ead58e9294af7f883a6fdcf119;hp=75957291c4d37ce005448de53fb159785a73361a;hpb=c0a63703ee7953fef480ece7b2d1934e015769a8;p=spline3.git diff --git a/src/Tetrahedron.hs b/src/Tetrahedron.hs index 7595729..2a4227a 100644 --- a/src/Tetrahedron.hs +++ b/src/Tetrahedron.hs @@ -313,20 +313,8 @@ det p0 p1 p2 p3 = -- page 436. {-# INLINE volume #-} volume :: Tetrahedron -> Double -volume t - | v0' == v1' = 0 - | v0' == v2' = 0 - | v0' == v3' = 0 - | v1' == v2' = 0 - | v1' == v3' = 0 - | v2' == v3' = 0 - | otherwise = (1/6)*(det v0' v1' v2' v3') - where - v0' = v0 t - v1' = v1 t - v2' = v2 t - v3' = v3 t - +volume (Tetrahedron _ v0' v1' v2' v3' _) = + (1/6)*(det v0' v1' v2' v3') -- | The barycentric coordinates of a point with respect to v0. {-# INLINE b0 #-}