-- | The Face module just contains the definition of the 'Face' data
-- type and its two typeclass instances.
+--
module Face (
Face(..),
- center
- )
+ center )
where
-import Point
+import Point ( Point, scale )
data Face = Face { v0 :: !Point,
v1 :: !Point,
-- tetrahedron.
center :: Face -> Point
center (Face v0' v1' v2' v3') =
- (v0' + v1' + v2' + v3') `scale` (1/4)
+ (v0' + v1' + v2' + v3') `scale` (1 / 4)