-- 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.2
-- | 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 GHC.Base.Functor Data.AffineSpace.Point.Point
instance Data.Data.Data v => Data.Data.Data (Data.AffineSpace.Point.Point v)
instance GHC.Show.Show v => GHC.Show.Show (Data.AffineSpace.Point.Point v)
instance GHC.Read.Read v => GHC.Read.Read (Data.AffineSpace.Point.Point v)
instance GHC.Classes.Ord v => GHC.Classes.Ord (Data.AffineSpace.Point.Point v)
instance GHC.Classes.Eq v => GHC.Classes.Eq (Data.AffineSpace.Point.Point v)
instance Data.AdditiveGroup.AdditiveGroup v => Data.AffineSpace.AffineSpace (Data.AffineSpace.Point.Point v)