iota-0.1.0.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Geometry

Documentation

data Point a Source #

Constructors

P !a !a 

Instances

Instances details
Functor Point Source # 
Instance details

Defined in Geometry

Methods

fmap :: (a -> b) -> Point a -> Point b #

(<$) :: a -> Point b -> Point a #

Unbox a => Vector Vector (Point a) Source # 
Instance details

Defined in Geometry

Methods

basicUnsafeFreeze :: Mutable Vector s (Point a) -> ST s (Vector (Point a))

basicUnsafeThaw :: Vector (Point a) -> ST s (Mutable Vector s (Point a))

basicLength :: Vector (Point a) -> Int

basicUnsafeSlice :: Int -> Int -> Vector (Point a) -> Vector (Point a)

basicUnsafeIndexM :: Vector (Point a) -> Int -> Box (Point a)

basicUnsafeCopy :: Mutable Vector s (Point a) -> Vector (Point a) -> ST s ()

elemseq :: Vector (Point a) -> Point a -> b -> b

Unbox a => MVector MVector (Point a) Source # 
Instance details

Defined in Geometry

Methods

basicLength :: MVector s (Point a) -> Int

basicUnsafeSlice :: Int -> Int -> MVector s (Point a) -> MVector s (Point a)

basicOverlaps :: MVector s (Point a) -> MVector s (Point a) -> Bool

basicUnsafeNew :: Int -> ST s (MVector s (Point a))

basicInitialize :: MVector s (Point a) -> ST s ()

basicUnsafeReplicate :: Int -> Point a -> ST s (MVector s (Point a))

basicUnsafeRead :: MVector s (Point a) -> Int -> ST s (Point a)

basicUnsafeWrite :: MVector s (Point a) -> Int -> Point a -> ST s ()

basicClear :: MVector s (Point a) -> ST s ()

basicSet :: MVector s (Point a) -> Point a -> ST s ()

basicUnsafeCopy :: MVector s (Point a) -> MVector s (Point a) -> ST s ()

basicUnsafeMove :: MVector s (Point a) -> MVector s (Point a) -> ST s ()

basicUnsafeGrow :: MVector s (Point a) -> Int -> ST s (MVector s (Point a))

Num a => Num (Point a) Source # 
Instance details

Defined in Geometry

Methods

(+) :: Point a -> Point a -> Point a #

(-) :: Point a -> Point a -> Point a #

(*) :: Point a -> Point a -> Point a #

negate :: Point a -> Point a #

abs :: Point a -> Point a #

signum :: Point a -> Point a #

fromInteger :: Integer -> Point a #

Show a => Show (Point a) Source # 
Instance details

Defined in Geometry

Methods

showsPrec :: Int -> Point a -> ShowS #

show :: Point a -> String #

showList :: [Point a] -> ShowS #

Eq a => Eq (Point a) Source # 
Instance details

Defined in Geometry

Methods

(==) :: Point a -> Point a -> Bool #

(/=) :: Point a -> Point a -> Bool #

Ord a => Ord (Point a) Source # 
Instance details

Defined in Geometry

Methods

compare :: Point a -> Point a -> Ordering #

(<) :: Point a -> Point a -> Bool #

(<=) :: Point a -> Point a -> Bool #

(>) :: Point a -> Point a -> Bool #

(>=) :: Point a -> Point a -> Bool #

max :: Point a -> Point a -> Point a #

min :: Point a -> Point a -> Point a #

Unbox a => Unbox (Point a) Source # 
Instance details

Defined in Geometry

newtype MVector s (Point a) Source # 
Instance details

Defined in Geometry

newtype MVector s (Point a) = MV_Point (MVector s a)
newtype Vector (Point a) Source # 
Instance details

Defined in Geometry

newtype Vector (Point a) = V_Point (Vector a)

dot :: Num a => Point a -> Point a -> a Source #

cross :: Num a => Point a -> Point a -> a Source #

conjugate :: Num a => Point a -> Point a Source #

area :: Num a => Point a -> Point a -> Point a -> a Source #

compareCCW :: (Num a, Ord a) => Point a -> Point a -> Point a -> Ordering Source #

compareCW :: (Num a, Ord a) => Point a -> Point a -> Point a -> Ordering Source #

sqrNorm :: Num a => Point a -> a Source #

norm :: Floating a => Point a -> a Source #