Maintainer | diagrams-discuss@googlegroups.com |
---|
A type for points (as distinct from vectors).
- newtype Point v = P v
- origin :: AdditiveGroup v => Point v
- (*.) :: VectorSpace v => Scalar v -> Point v -> Point v
Points
Point
is a newtype wrapper around vectors that we wish to treat
as points, so we don't get them mixed up. The distinction is
important: translations affect points, but leave vectors
unchanged. Points are instances of the AffineSpace
class from
Data.AffineSpace.
P v |
origin :: AdditiveGroup v => Point vSource
The origin of the vector space v
.