| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
NumHask.Space.Point
Description
A 2-dimensional point.
Documentation
A 2-dim point of a's
A Point is functorial over both arguments, and is a Num instance.
>>>let p = Point 1 1>>>p + pPoint 2 2>>>(2*) <$> pPoint 2 2
A major reason for this bespoke treatment of a point is that Points do not have maximums and minimums but they form a lattice, and this is useful for folding points to find out the (rectangular) Space they occupy.
>>>Point 0 1 /\ Point 1 0Point 0 0>>>Point 0 1 \/ Point 1 0Point 1 1
Constructors
| Point a a |