-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A type for points, as distinct from vectors.
--   
--   A type for points, as distinct from vectors, built on top of
--   Data.AffineSpace.
@package vector-space-points
@version 0.1.2.0


-- | A type for <i>points</i> (as distinct from vectors), with an
--   appropriate AffineSpace instance.
module Data.AffineSpace.Point

-- | <tt>Point</tt> is a newtype wrapper around vectors used to represent
--   points, so we don't get them mixed up. The distinction between vectors
--   and points is important: translations affect points, but leave vectors
--   unchanged. Points are instances of the <a>AffineSpace</a> class from
--   <a>Data.AffineSpace</a>.
newtype Point v
P :: v -> Point v

-- | Convert a point <tt>p</tt> into the vector from the origin to
--   <tt>p</tt>. This should be considered a "semantically unsafe"
--   operation; think carefully about whether and why you need to use it.
--   The recommended way to do this conversion would be to write <tt>(p
--   <a>.-.</a> <a>origin</a>)</tt>.
unPoint :: Point v -> v

-- | The origin of the vector space <tt>v</tt>.
origin :: AdditiveGroup v => Point v

-- | Scale a point by a scalar.
(*.) :: VectorSpace v => Scalar v -> Point v -> Point v
instance Typeable1 Point
instance Eq v => Eq (Point v)
instance Ord v => Ord (Point v)
instance Read v => Read (Point v)
instance Show v => Show (Point v)
instance Data v => Data (Point v)
instance Functor Point
instance AdditiveGroup v => AffineSpace (Point v)
instance Newtype (Point v) v
