hgeometry- Geometric Algorithms, Data structures, and Data types.

Safe HaskellNone




data Triangle p r Source


Triangle (Point 2 r :+ p) (Point 2 r :+ p) (Point 2 r :+ p) 


Functor (Triangle p) Source 
PointFunctor (Triangle p) Source 
(Eq p, Eq r) => Eq (Triangle p r) Source 
(Show p, Show r) => Show (Triangle p r) Source 
Num r => IsTransformable (Triangle d r) Source 
type NumType (Triangle p r) = r Source 
type Dimension (Triangle p r) = 2 Source 

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.