Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Triangle p r = Triangle (Point 2 r :+ p) (Point 2 r :+ p) (Point 2 r :+ p)
- area :: Fractional r => Triangle p r -> r
- doubleArea :: Num r => Triangle p r -> r
- inscribedDisk :: (Eq r, Fractional r) => Triangle p r -> Maybe (Disk () r)
Documentation
area :: Fractional r => Triangle p r -> r Source #
Compute the area of a triangle
doubleArea :: Num r => Triangle p r -> r Source #
2*the area of a triangle.
inscribedDisk :: (Eq r, Fractional r) => Triangle p r -> Maybe (Disk () r) Source #
get the inscribed disk. Returns Nothing if the triangle is degenerate, i.e. if the points are colinear.