vector-space-points-0.1.0.0: A type for points, as distinct from vectors.

Maintainerbyorgey@cis.upenn.edu

Data.AffineSpace.Point

Contents

Description

A type for points (as distinct from vectors), with an appropriate AffineSpace instance.

Synopsis

Points

newtype Point v Source

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.

Constructors

P v 

Instances

Functor Point 
Typeable1 Point 
Eq v => Eq (Point v) 
Data v => Data (Point v) 
Ord v => Ord (Point v) 
Read v => Read (Point v) 
Show v => Show (Point v) 
AdditiveGroup v => AffineSpace (Point v) 
Newtype (Point v) v 

origin :: AdditiveGroup v => Point vSource

The origin of the vector space v.

(*.) :: VectorSpace v => Scalar v -> Point v -> Point vSource

Scale a point by a scalar.