-- 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.2.1
-- | A type for points (as distinct from vectors), with an
-- appropriate AffineSpace instance.
module Data.AffineSpace.Point
-- | Point 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 AffineSpace class from
-- Data.AffineSpace.
newtype Point v
P :: v -> Point v
-- | Convert a point p into the vector from the origin to
-- p. 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 (p
-- .-. origin).
unPoint :: Point v -> v
-- | The origin of the vector space v.
origin :: AdditiveGroup v => Point v
-- | Scale a point by a scalar.
(*.) :: VectorSpace v => Scalar v -> Point v -> Point v
-- | Reflect a point through the origin.
mirror :: AdditiveGroup v => Point v -> Point v
-- | Apply a transformation relative to the given point.
relative :: AffineSpace p => p -> (Diff p -> Diff p) -> p -> p
-- | Apply a transformation relative to the given point.
relative2 :: AffineSpace p => p -> (Diff p -> Diff p -> Diff p) -> p -> p -> p
-- | Apply a transformation relative to the given point.
relative3 :: AffineSpace p => p -> (Diff p -> Diff p -> Diff p -> Diff p) -> p -> p -> p -> p
-- | Mirror a point through a given point.
reflectThrough :: AffineSpace p => p -> p -> p
instance Typeable 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)