spatial-math-0.3.0.0: 3d math including quaternions/euler angles/dcms and utility functions

Safe HaskellNone
LanguageHaskell2010

SpatialMathT

Contents

Synopsis

Documentation

class Floating a => ArcTan2 a where Source #

doesn't require RealFloat, used for overloading symbolics

Minimal complete definition

arctan2

Methods

arctan2 :: a -> a -> a Source #

data Euler a Source #

3-2-1 Euler angle rotation sequence

Constructors

Euler 

Fields

Instances

Functor Euler Source # 

Methods

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

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

Applicative Euler Source # 

Methods

pure :: a -> Euler a #

(<*>) :: Euler (a -> b) -> Euler a -> Euler b #

(*>) :: Euler a -> Euler b -> Euler b #

(<*) :: Euler a -> Euler b -> Euler a #

Foldable Euler Source # 

Methods

fold :: Monoid m => Euler m -> m #

foldMap :: Monoid m => (a -> m) -> Euler a -> m #

foldr :: (a -> b -> b) -> b -> Euler a -> b #

foldr' :: (a -> b -> b) -> b -> Euler a -> b #

foldl :: (b -> a -> b) -> b -> Euler a -> b #

foldl' :: (b -> a -> b) -> b -> Euler a -> b #

foldr1 :: (a -> a -> a) -> Euler a -> a #

foldl1 :: (a -> a -> a) -> Euler a -> a #

toList :: Euler a -> [a] #

null :: Euler a -> Bool #

length :: Euler a -> Int #

elem :: Eq a => a -> Euler a -> Bool #

maximum :: Ord a => Euler a -> a #

minimum :: Ord a => Euler a -> a #

sum :: Num a => Euler a -> a #

product :: Num a => Euler a -> a #

Traversable Euler Source # 

Methods

traverse :: Applicative f => (a -> f b) -> Euler a -> f (Euler b) #

sequenceA :: Applicative f => Euler (f a) -> f (Euler a) #

mapM :: Monad m => (a -> m b) -> Euler a -> m (Euler b) #

sequence :: Monad m => Euler (m a) -> m (Euler a) #

Generic1 Euler Source # 

Associated Types

type Rep1 (Euler :: * -> *) :: * -> * #

Methods

from1 :: Euler a -> Rep1 Euler a #

to1 :: Rep1 Euler a -> Euler a #

(ArcTan2 a, Floating a, Ord a) => Rotation Euler a Source # 

Methods

compose :: Rot f1 f2 Euler a -> Rot f2 f3 Euler a -> Rot f1 f3 Euler a Source #

rot :: Rot f1 f2 Euler a -> V3T f1 a -> V3T f2 a Source #

rot' :: Rot f1 f2 Euler a -> V3T f2 a -> V3T f1 a Source #

transpose :: Rot f1 f2 Euler a -> Rot f2 f1 Euler a Source #

identity :: Rot f1 f2 Euler a Source #

Eq a => Eq (Euler a) Source # 

Methods

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

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

Data a => Data (Euler a) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Euler a -> c (Euler a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Euler a) #

toConstr :: Euler a -> Constr #

dataTypeOf :: Euler a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Euler a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Euler a)) #

gmapT :: (forall b. Data b => b -> b) -> Euler a -> Euler a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Euler a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Euler a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Euler a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Euler a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Euler a -> m (Euler a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Euler a -> m (Euler a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Euler a -> m (Euler a) #

Ord a => Ord (Euler a) Source # 

Methods

compare :: Euler a -> Euler a -> Ordering #

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

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

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

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

max :: Euler a -> Euler a -> Euler a #

min :: Euler a -> Euler a -> Euler a #

Show a => Show (Euler a) Source # 

Methods

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

show :: Euler a -> String #

showList :: [Euler a] -> ShowS #

Generic (Euler a) Source # 

Associated Types

type Rep (Euler a) :: * -> * #

Methods

from :: Euler a -> Rep (Euler a) x #

to :: Rep (Euler a) x -> Euler a #

Binary a => Binary (Euler a) Source # 

Methods

put :: Euler a -> Put #

get :: Get (Euler a) #

putList :: [Euler a] -> Put #

Serialize a => Serialize (Euler a) Source # 

Methods

put :: Putter (Euler a) #

get :: Get (Euler a) #

type Rep1 Euler Source # 
type Rep (Euler a) Source # 

data Quaternion a :: * -> * #

Quaternions

Constructors

Quaternion ~a ~(V3 a) 

Instances

Monad Quaternion 

Methods

(>>=) :: Quaternion a -> (a -> Quaternion b) -> Quaternion b #

(>>) :: Quaternion a -> Quaternion b -> Quaternion b #

return :: a -> Quaternion a #

fail :: String -> Quaternion a #

Functor Quaternion 

Methods

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

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

MonadFix Quaternion 

Methods

mfix :: (a -> Quaternion a) -> Quaternion a #

Applicative Quaternion 

Methods

pure :: a -> Quaternion a #

(<*>) :: Quaternion (a -> b) -> Quaternion a -> Quaternion b #

(*>) :: Quaternion a -> Quaternion b -> Quaternion b #

(<*) :: Quaternion a -> Quaternion b -> Quaternion a #

Foldable Quaternion 

Methods

fold :: Monoid m => Quaternion m -> m #

foldMap :: Monoid m => (a -> m) -> Quaternion a -> m #

foldr :: (a -> b -> b) -> b -> Quaternion a -> b #

foldr' :: (a -> b -> b) -> b -> Quaternion a -> b #

foldl :: (b -> a -> b) -> b -> Quaternion a -> b #

foldl' :: (b -> a -> b) -> b -> Quaternion a -> b #

foldr1 :: (a -> a -> a) -> Quaternion a -> a #

foldl1 :: (a -> a -> a) -> Quaternion a -> a #

toList :: Quaternion a -> [a] #

null :: Quaternion a -> Bool #

length :: Quaternion a -> Int #

elem :: Eq a => a -> Quaternion a -> Bool #

maximum :: Ord a => Quaternion a -> a #

minimum :: Ord a => Quaternion a -> a #

sum :: Num a => Quaternion a -> a #

product :: Num a => Quaternion a -> a #

Traversable Quaternion 

Methods

traverse :: Applicative f => (a -> f b) -> Quaternion a -> f (Quaternion b) #

sequenceA :: Applicative f => Quaternion (f a) -> f (Quaternion a) #

mapM :: Monad m => (a -> m b) -> Quaternion a -> m (Quaternion b) #

sequence :: Monad m => Quaternion (m a) -> m (Quaternion a) #

Generic1 Quaternion 

Associated Types

type Rep1 (Quaternion :: * -> *) :: * -> * #

Distributive Quaternion 

Methods

distribute :: Functor f => f (Quaternion a) -> Quaternion (f a) #

collect :: Functor f => (a -> Quaternion b) -> f a -> Quaternion (f b) #

distributeM :: Monad m => m (Quaternion a) -> Quaternion (m a) #

collectM :: Monad m => (a -> Quaternion b) -> m a -> Quaternion (m b) #

Representable Quaternion 

Associated Types

type Rep (Quaternion :: * -> *) :: * #

Methods

tabulate :: (Rep Quaternion -> a) -> Quaternion a #

index :: Quaternion a -> Rep Quaternion -> a #

Eq1 Quaternion 

Methods

liftEq :: (a -> b -> Bool) -> Quaternion a -> Quaternion b -> Bool #

Ord1 Quaternion 

Methods

liftCompare :: (a -> b -> Ordering) -> Quaternion a -> Quaternion b -> Ordering #

Read1 Quaternion 

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Quaternion a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Quaternion a] #

Show1 Quaternion 

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Quaternion a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Quaternion a] -> ShowS #

MonadZip Quaternion 

Methods

mzip :: Quaternion a -> Quaternion b -> Quaternion (a, b) #

mzipWith :: (a -> b -> c) -> Quaternion a -> Quaternion b -> Quaternion c #

munzip :: Quaternion (a, b) -> (Quaternion a, Quaternion b) #

Serial1 Quaternion 

Methods

serializeWith :: MonadPut m => (a -> m ()) -> Quaternion a -> m () #

deserializeWith :: MonadGet m => m a -> m (Quaternion a) #

Complicated Quaternion 

Methods

_e :: Functor f => (a -> f a) -> Quaternion a -> f (Quaternion a) #

_i :: Functor f => (a -> f a) -> Quaternion a -> f (Quaternion a) #

Hamiltonian Quaternion 

Methods

_j :: Functor f => (a -> f a) -> Quaternion a -> f (Quaternion a) #

_k :: Functor f => (a -> f a) -> Quaternion a -> f (Quaternion a) #

_ijk :: Functor f => (V3 a -> f (V3 a)) -> Quaternion a -> f (Quaternion a) #

Metric Quaternion 

Methods

dot :: Num a => Quaternion a -> Quaternion a -> a #

quadrance :: Num a => Quaternion a -> a #

qd :: Num a => Quaternion a -> Quaternion a -> a #

distance :: Floating a => Quaternion a -> Quaternion a -> a #

norm :: Floating a => Quaternion a -> a #

signorm :: Floating a => Quaternion a -> Quaternion a #

Additive Quaternion 

Methods

zero :: Num a => Quaternion a #

(^+^) :: Num a => Quaternion a -> Quaternion a -> Quaternion a #

(^-^) :: Num a => Quaternion a -> Quaternion a -> Quaternion a #

lerp :: Num a => a -> Quaternion a -> Quaternion a -> Quaternion a #

liftU2 :: (a -> a -> a) -> Quaternion a -> Quaternion a -> Quaternion a #

liftI2 :: (a -> b -> c) -> Quaternion a -> Quaternion b -> Quaternion c #

Apply Quaternion 

Methods

(<.>) :: Quaternion (a -> b) -> Quaternion a -> Quaternion b #

(.>) :: Quaternion a -> Quaternion b -> Quaternion b #

(<.) :: Quaternion a -> Quaternion b -> Quaternion a #

Bind Quaternion 

Methods

(>>-) :: Quaternion a -> (a -> Quaternion b) -> Quaternion b #

join :: Quaternion (Quaternion a) -> Quaternion a #

Num a => Rotation Quaternion a Source # 

Methods

compose :: Rot f1 f2 Quaternion a -> Rot f2 f3 Quaternion a -> Rot f1 f3 Quaternion a Source #

rot :: Rot f1 f2 Quaternion a -> V3T f1 a -> V3T f2 a Source #

rot' :: Rot f1 f2 Quaternion a -> V3T f2 a -> V3T f1 a Source #

transpose :: Rot f1 f2 Quaternion a -> Rot f2 f1 Quaternion a Source #

identity :: Rot f1 f2 Quaternion a Source #

Unbox a => Vector Vector (Quaternion a) 
Unbox a => MVector MVector (Quaternion a) 
Eq a => Eq (Quaternion a) 

Methods

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

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

RealFloat a => Floating (Quaternion a) 
RealFloat a => Fractional (Quaternion a) 
Data a => Data (Quaternion a) 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Quaternion a -> c (Quaternion a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Quaternion a) #

toConstr :: Quaternion a -> Constr #

dataTypeOf :: Quaternion a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (Quaternion a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Quaternion a)) #

gmapT :: (forall b. Data b => b -> b) -> Quaternion a -> Quaternion a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Quaternion a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Quaternion a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Quaternion a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Quaternion a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Quaternion a -> m (Quaternion a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Quaternion a -> m (Quaternion a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Quaternion a -> m (Quaternion a) #

RealFloat a => Num (Quaternion a) 
Ord a => Ord (Quaternion a) 
Read a => Read (Quaternion a) 
Show a => Show (Quaternion a) 
Ix a => Ix (Quaternion a) 
Generic (Quaternion a) 

Associated Types

type Rep (Quaternion a) :: * -> * #

Methods

from :: Quaternion a -> Rep (Quaternion a) x #

to :: Rep (Quaternion a) x -> Quaternion a #

Storable a => Storable (Quaternion a) 

Methods

sizeOf :: Quaternion a -> Int #

alignment :: Quaternion a -> Int #

peekElemOff :: Ptr (Quaternion a) -> Int -> IO (Quaternion a) #

pokeElemOff :: Ptr (Quaternion a) -> Int -> Quaternion a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Quaternion a) #

pokeByteOff :: Ptr b -> Int -> Quaternion a -> IO () #

peek :: Ptr (Quaternion a) -> IO (Quaternion a) #

poke :: Ptr (Quaternion a) -> Quaternion a -> IO () #

Binary a => Binary (Quaternion a) 

Methods

put :: Quaternion a -> Put #

get :: Get (Quaternion a) #

putList :: [Quaternion a] -> Put #

Serial a => Serial (Quaternion a) 

Methods

serialize :: MonadPut m => Quaternion a -> m () #

deserialize :: MonadGet m => m (Quaternion a) #

Serialize a => Serialize (Quaternion a) 

Methods

put :: Putter (Quaternion a) #

get :: Get (Quaternion a) #

NFData a => NFData (Quaternion a) 

Methods

rnf :: Quaternion a -> () #

Hashable a => Hashable (Quaternion a) 

Methods

hashWithSalt :: Int -> Quaternion a -> Int #

hash :: Quaternion a -> Int #

Unbox a => Unbox (Quaternion a) 
Ixed (Quaternion a) 
(Conjugate a, RealFloat a) => Conjugate (Quaternion a) 

Methods

conjugate :: Quaternion a -> Quaternion a #

(RealFloat a, Epsilon a) => Epsilon (Quaternion a) 

Methods

nearZero :: Quaternion a -> Bool #

FunctorWithIndex (E Quaternion) Quaternion 

Methods

imap :: (E Quaternion -> a -> b) -> Quaternion a -> Quaternion b #

imapped :: (Indexable (E Quaternion) p, Settable f) => p a (f b) -> Quaternion a -> f (Quaternion b) #

FoldableWithIndex (E Quaternion) Quaternion 

Methods

ifoldMap :: Monoid m => (E Quaternion -> a -> m) -> Quaternion a -> m #

ifolded :: (Indexable (E Quaternion) p, Contravariant f, Applicative f) => p a (f a) -> Quaternion a -> f (Quaternion a) #

ifoldr :: (E Quaternion -> a -> b -> b) -> b -> Quaternion a -> b #

ifoldl :: (E Quaternion -> b -> a -> b) -> b -> Quaternion a -> b #

ifoldr' :: (E Quaternion -> a -> b -> b) -> b -> Quaternion a -> b #

ifoldl' :: (E Quaternion -> b -> a -> b) -> b -> Quaternion a -> b #

TraversableWithIndex (E Quaternion) Quaternion 

Methods

itraverse :: Applicative f => (E Quaternion -> a -> f b) -> Quaternion a -> f (Quaternion b) #

itraversed :: (Indexable (E Quaternion) p, Applicative f) => p a (f b) -> Quaternion a -> f (Quaternion b) #

Each (Quaternion a) (Quaternion b) a b 

Methods

each :: Traversal (Quaternion a) (Quaternion b) a b #

type Rep1 Quaternion 
type Rep1 Quaternion = D1 (MetaData "Quaternion" "Linear.Quaternion" "linear-1.20.5-ALqHTYew01KD1PdDd6TYmz" False) (C1 (MetaCons "Quaternion" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) Par1) (S1 (MetaSel (Nothing Symbol) SourceUnpack SourceStrict DecidedStrict) (Rec1 V3))))
type Rep Quaternion 
data MVector s (Quaternion a) 
type Rep (Quaternion a) 
type Rep (Quaternion a) = D1 (MetaData "Quaternion" "Linear.Quaternion" "linear-1.20.5-ALqHTYew01KD1PdDd6TYmz" False) (C1 (MetaCons "Quaternion" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 a)) (S1 (MetaSel (Nothing Symbol) SourceUnpack SourceStrict DecidedStrict) (Rec0 (V3 a)))))
data Vector (Quaternion a) 
type Index (Quaternion a) 
type IxValue (Quaternion a) 
type IxValue (Quaternion a) = a

data V3 a :: * -> * #

A 3-dimensional vector

Constructors

V3 ~a ~a ~a 

Instances

Monad V3 

Methods

(>>=) :: V3 a -> (a -> V3 b) -> V3 b #

(>>) :: V3 a -> V3 b -> V3 b #

return :: a -> V3 a #

fail :: String -> V3 a #

Functor V3 

Methods

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

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

MonadFix V3 

Methods

mfix :: (a -> V3 a) -> V3 a #

Applicative V3 

Methods

pure :: a -> V3 a #

(<*>) :: V3 (a -> b) -> V3 a -> V3 b #

(*>) :: V3 a -> V3 b -> V3 b #

(<*) :: V3 a -> V3 b -> V3 a #

Foldable V3 

Methods

fold :: Monoid m => V3 m -> m #

foldMap :: Monoid m => (a -> m) -> V3 a -> m #

foldr :: (a -> b -> b) -> b -> V3 a -> b #

foldr' :: (a -> b -> b) -> b -> V3 a -> b #

foldl :: (b -> a -> b) -> b -> V3 a -> b #

foldl' :: (b -> a -> b) -> b -> V3 a -> b #

foldr1 :: (a -> a -> a) -> V3 a -> a #

foldl1 :: (a -> a -> a) -> V3 a -> a #

toList :: V3 a -> [a] #

null :: V3 a -> Bool #

length :: V3 a -> Int #

elem :: Eq a => a -> V3 a -> Bool #

maximum :: Ord a => V3 a -> a #

minimum :: Ord a => V3 a -> a #

sum :: Num a => V3 a -> a #

product :: Num a => V3 a -> a #

Traversable V3 

Methods

traverse :: Applicative f => (a -> f b) -> V3 a -> f (V3 b) #

sequenceA :: Applicative f => V3 (f a) -> f (V3 a) #

mapM :: Monad m => (a -> m b) -> V3 a -> m (V3 b) #

sequence :: Monad m => V3 (m a) -> m (V3 a) #

Generic1 V3 

Associated Types

type Rep1 (V3 :: * -> *) :: * -> * #

Methods

from1 :: V3 a -> Rep1 V3 a #

to1 :: Rep1 V3 a -> V3 a #

Distributive V3 

Methods

distribute :: Functor f => f (V3 a) -> V3 (f a) #

collect :: Functor f => (a -> V3 b) -> f a -> V3 (f b) #

distributeM :: Monad m => m (V3 a) -> V3 (m a) #

collectM :: Monad m => (a -> V3 b) -> m a -> V3 (m b) #

Representable V3 

Associated Types

type Rep (V3 :: * -> *) :: * #

Methods

tabulate :: (Rep V3 -> a) -> V3 a #

index :: V3 a -> Rep V3 -> a #

Eq1 V3 

Methods

liftEq :: (a -> b -> Bool) -> V3 a -> V3 b -> Bool #

Ord1 V3 

Methods

liftCompare :: (a -> b -> Ordering) -> V3 a -> V3 b -> Ordering #

Read1 V3 

Methods

liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (V3 a) #

liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [V3 a] #

Show1 V3 

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> V3 a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [V3 a] -> ShowS #

MonadZip V3 

Methods

mzip :: V3 a -> V3 b -> V3 (a, b) #

mzipWith :: (a -> b -> c) -> V3 a -> V3 b -> V3 c #

munzip :: V3 (a, b) -> (V3 a, V3 b) #

Serial1 V3 

Methods

serializeWith :: MonadPut m => (a -> m ()) -> V3 a -> m () #

deserializeWith :: MonadGet m => m a -> m (V3 a) #

Traversable1 V3 

Methods

traverse1 :: Apply f => (a -> f b) -> V3 a -> f (V3 b) #

sequence1 :: Apply f => V3 (f b) -> f (V3 b) #

R3 V3 

Methods

_z :: Functor f => (a -> f a) -> V3 a -> f (V3 a) #

_xyz :: Functor f => (V3 a -> f (V3 a)) -> V3 a -> f (V3 a) #

R2 V3 

Methods

_y :: Functor f => (a -> f a) -> V3 a -> f (V3 a) #

_xy :: Functor f => (V2 a -> f (V2 a)) -> V3 a -> f (V3 a) #

R1 V3 

Methods

_x :: Functor f => (a -> f a) -> V3 a -> f (V3 a) #

Metric V3 

Methods

dot :: Num a => V3 a -> V3 a -> a #

quadrance :: Num a => V3 a -> a #

qd :: Num a => V3 a -> V3 a -> a #

distance :: Floating a => V3 a -> V3 a -> a #

norm :: Floating a => V3 a -> a #

signorm :: Floating a => V3 a -> V3 a #

Additive V3 

Methods

zero :: Num a => V3 a #

(^+^) :: Num a => V3 a -> V3 a -> V3 a #

(^-^) :: Num a => V3 a -> V3 a -> V3 a #

lerp :: Num a => a -> V3 a -> V3 a -> V3 a #

liftU2 :: (a -> a -> a) -> V3 a -> V3 a -> V3 a #

liftI2 :: (a -> b -> c) -> V3 a -> V3 b -> V3 c #

Apply V3 

Methods

(<.>) :: V3 (a -> b) -> V3 a -> V3 b #

(.>) :: V3 a -> V3 b -> V3 b #

(<.) :: V3 a -> V3 b -> V3 a #

Bind V3 

Methods

(>>-) :: V3 a -> (a -> V3 b) -> V3 b #

join :: V3 (V3 a) -> V3 a #

Foldable1 V3 

Methods

fold1 :: Semigroup m => V3 m -> m #

foldMap1 :: Semigroup m => (a -> m) -> V3 a -> m #

Unbox a => Vector Vector (V3 a) 

Methods

basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) (V3 a) -> m (Vector (V3 a)) #

basicUnsafeThaw :: PrimMonad m => Vector (V3 a) -> m (Mutable Vector (PrimState m) (V3 a)) #

basicLength :: Vector (V3 a) -> Int #

basicUnsafeSlice :: Int -> Int -> Vector (V3 a) -> Vector (V3 a) #

basicUnsafeIndexM :: Monad m => Vector (V3 a) -> Int -> m (V3 a) #

basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) (V3 a) -> Vector (V3 a) -> m () #

elemseq :: Vector (V3 a) -> V3 a -> b -> b #

Unbox a => MVector MVector (V3 a) 

Methods

basicLength :: MVector s (V3 a) -> Int #

basicUnsafeSlice :: Int -> Int -> MVector s (V3 a) -> MVector s (V3 a) #

basicOverlaps :: MVector s (V3 a) -> MVector s (V3 a) -> Bool #

basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) (V3 a)) #

basicInitialize :: PrimMonad m => MVector (PrimState m) (V3 a) -> m () #

basicUnsafeReplicate :: PrimMonad m => Int -> V3 a -> m (MVector (PrimState m) (V3 a)) #

basicUnsafeRead :: PrimMonad m => MVector (PrimState m) (V3 a) -> Int -> m (V3 a) #

basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) (V3 a) -> Int -> V3 a -> m () #

basicClear :: PrimMonad m => MVector (PrimState m) (V3 a) -> m () #

basicSet :: PrimMonad m => MVector (PrimState m) (V3 a) -> V3 a -> m () #

basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) (V3 a) -> MVector (PrimState m) (V3 a) -> m () #

basicUnsafeMove :: PrimMonad m => MVector (PrimState m) (V3 a) -> MVector (PrimState m) (V3 a) -> m () #

basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) (V3 a) -> Int -> m (MVector (PrimState m) (V3 a)) #

Bounded a => Bounded (V3 a) 

Methods

minBound :: V3 a #

maxBound :: V3 a #

Eq a => Eq (V3 a) 

Methods

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

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

Floating a => Floating (V3 a) 

Methods

pi :: V3 a #

exp :: V3 a -> V3 a #

log :: V3 a -> V3 a #

sqrt :: V3 a -> V3 a #

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

logBase :: V3 a -> V3 a -> V3 a #

sin :: V3 a -> V3 a #

cos :: V3 a -> V3 a #

tan :: V3 a -> V3 a #

asin :: V3 a -> V3 a #

acos :: V3 a -> V3 a #

atan :: V3 a -> V3 a #

sinh :: V3 a -> V3 a #

cosh :: V3 a -> V3 a #

tanh :: V3 a -> V3 a #

asinh :: V3 a -> V3 a #

acosh :: V3 a -> V3 a #

atanh :: V3 a -> V3 a #

log1p :: V3 a -> V3 a #

expm1 :: V3 a -> V3 a #

log1pexp :: V3 a -> V3 a #

log1mexp :: V3 a -> V3 a #

Fractional a => Fractional (V3 a) 

Methods

(/) :: V3 a -> V3 a -> V3 a #

recip :: V3 a -> V3 a #

fromRational :: Rational -> V3 a #

Data a => Data (V3 a) 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> V3 a -> c (V3 a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (V3 a) #

toConstr :: V3 a -> Constr #

dataTypeOf :: V3 a -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (V3 a)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (V3 a)) #

gmapT :: (forall b. Data b => b -> b) -> V3 a -> V3 a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> V3 a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> V3 a -> r #

gmapQ :: (forall d. Data d => d -> u) -> V3 a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> V3 a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> V3 a -> m (V3 a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> V3 a -> m (V3 a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> V3 a -> m (V3 a) #

Num a => Num (V3 a) 

Methods

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

(-) :: V3 a -> V3 a -> V3 a #

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

negate :: V3 a -> V3 a #

abs :: V3 a -> V3 a #

signum :: V3 a -> V3 a #

fromInteger :: Integer -> V3 a #

Ord a => Ord (V3 a) 

Methods

compare :: V3 a -> V3 a -> Ordering #

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

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

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

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

max :: V3 a -> V3 a -> V3 a #

min :: V3 a -> V3 a -> V3 a #

Read a => Read (V3 a) 
Show a => Show (V3 a) 

Methods

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

show :: V3 a -> String #

showList :: [V3 a] -> ShowS #

Ix a => Ix (V3 a) 

Methods

range :: (V3 a, V3 a) -> [V3 a] #

index :: (V3 a, V3 a) -> V3 a -> Int #

unsafeIndex :: (V3 a, V3 a) -> V3 a -> Int

inRange :: (V3 a, V3 a) -> V3 a -> Bool #

rangeSize :: (V3 a, V3 a) -> Int #

unsafeRangeSize :: (V3 a, V3 a) -> Int

Generic (V3 a) 

Associated Types

type Rep (V3 a) :: * -> * #

Methods

from :: V3 a -> Rep (V3 a) x #

to :: Rep (V3 a) x -> V3 a #

Storable a => Storable (V3 a) 

Methods

sizeOf :: V3 a -> Int #

alignment :: V3 a -> Int #

peekElemOff :: Ptr (V3 a) -> Int -> IO (V3 a) #

pokeElemOff :: Ptr (V3 a) -> Int -> V3 a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (V3 a) #

pokeByteOff :: Ptr b -> Int -> V3 a -> IO () #

peek :: Ptr (V3 a) -> IO (V3 a) #

poke :: Ptr (V3 a) -> V3 a -> IO () #

Binary a => Binary (V3 a) 

Methods

put :: V3 a -> Put #

get :: Get (V3 a) #

putList :: [V3 a] -> Put #

Serial a => Serial (V3 a) 

Methods

serialize :: MonadPut m => V3 a -> m () #

deserialize :: MonadGet m => m (V3 a) #

Serialize a => Serialize (V3 a) 

Methods

put :: Putter (V3 a) #

get :: Get (V3 a) #

NFData a => NFData (V3 a) 

Methods

rnf :: V3 a -> () #

Hashable a => Hashable (V3 a) 

Methods

hashWithSalt :: Int -> V3 a -> Int #

hash :: V3 a -> Int #

Unbox a => Unbox (V3 a) 
Ixed (V3 a) 

Methods

ix :: Index (V3 a) -> Traversal' (V3 a) (IxValue (V3 a)) #

Epsilon a => Epsilon (V3 a) 

Methods

nearZero :: V3 a -> Bool #

FunctorWithIndex (E V3) V3 

Methods

imap :: (E V3 -> a -> b) -> V3 a -> V3 b #

imapped :: (Indexable (E V3) p, Settable f) => p a (f b) -> V3 a -> f (V3 b) #

FoldableWithIndex (E V3) V3 

Methods

ifoldMap :: Monoid m => (E V3 -> a -> m) -> V3 a -> m #

ifolded :: (Indexable (E V3) p, Contravariant f, Applicative f) => p a (f a) -> V3 a -> f (V3 a) #

ifoldr :: (E V3 -> a -> b -> b) -> b -> V3 a -> b #

ifoldl :: (E V3 -> b -> a -> b) -> b -> V3 a -> b #

ifoldr' :: (E V3 -> a -> b -> b) -> b -> V3 a -> b #

ifoldl' :: (E V3 -> b -> a -> b) -> b -> V3 a -> b #

TraversableWithIndex (E V3) V3 

Methods

itraverse :: Applicative f => (E V3 -> a -> f b) -> V3 a -> f (V3 b) #

itraversed :: (Indexable (E V3) p, Applicative f) => p a (f b) -> V3 a -> f (V3 b) #

Each (V3 a) (V3 b) a b 

Methods

each :: Traversal (V3 a) (V3 b) a b #

Num a => Rotation ((:.) V3 V3) a Source # 

Methods

compose :: Rot f1 f2 (V3 :. V3) a -> Rot f2 f3 (V3 :. V3) a -> Rot f1 f3 (V3 :. V3) a Source #

rot :: Rot f1 f2 (V3 :. V3) a -> V3T f1 a -> V3T f2 a Source #

rot' :: Rot f1 f2 (V3 :. V3) a -> V3T f2 a -> V3T f1 a Source #

transpose :: Rot f1 f2 (V3 :. V3) a -> Rot f2 f1 (V3 :. V3) a Source #

identity :: Rot f1 f2 (V3 :. V3) a Source #

type Rep1 V3 
type Rep V3 
type Rep V3 = E V3
data MVector s (V3 a) 
data MVector s (V3 a) = MV_V3 ~Int ~(MVector s a)
type Rep (V3 a) 
data Vector (V3 a) 
data Vector (V3 a) = V_V3 ~Int ~(Vector a)
type Index (V3 a) 
type Index (V3 a) = E V3
type IxValue (V3 a) 
type IxValue (V3 a) = a

class Rotation g a where Source #

Minimal complete definition

compose, rot, rot', transpose, identity

Methods

compose :: Rot f1 f2 g a -> Rot f2 f3 g a -> Rot f1 f3 g a Source #

rot :: Rot f1 f2 g a -> V3T f1 a -> V3T f2 a Source #

rot' :: Rot f1 f2 g a -> V3T f2 a -> V3T f1 a Source #

transpose :: Rot f1 f2 g a -> Rot f2 f1 g a Source #

identity :: Rot f1 f2 g a Source #

Instances

Num a => Rotation Quaternion a Source # 

Methods

compose :: Rot f1 f2 Quaternion a -> Rot f2 f3 Quaternion a -> Rot f1 f3 Quaternion a Source #

rot :: Rot f1 f2 Quaternion a -> V3T f1 a -> V3T f2 a Source #

rot' :: Rot f1 f2 Quaternion a -> V3T f2 a -> V3T f1 a Source #

transpose :: Rot f1 f2 Quaternion a -> Rot f2 f1 Quaternion a Source #

identity :: Rot f1 f2 Quaternion a Source #

(ArcTan2 a, Floating a, Ord a) => Rotation Euler a Source # 

Methods

compose :: Rot f1 f2 Euler a -> Rot f2 f3 Euler a -> Rot f1 f3 Euler a Source #

rot :: Rot f1 f2 Euler a -> V3T f1 a -> V3T f2 a Source #

rot' :: Rot f1 f2 Euler a -> V3T f2 a -> V3T f1 a Source #

transpose :: Rot f1 f2 Euler a -> Rot f2 f1 Euler a Source #

identity :: Rot f1 f2 Euler a Source #

Num a => Rotation ((:.) V3 V3) a Source # 

Methods

compose :: Rot f1 f2 (V3 :. V3) a -> Rot f2 f3 (V3 :. V3) a -> Rot f1 f3 (V3 :. V3) a Source #

rot :: Rot f1 f2 (V3 :. V3) a -> V3T f1 a -> V3T f2 a Source #

rot' :: Rot f1 f2 (V3 :. V3) a -> V3T f2 a -> V3T f1 a Source #

transpose :: Rot f1 f2 (V3 :. V3) a -> Rot f2 f1 (V3 :. V3) a Source #

identity :: Rot f1 f2 (V3 :. V3) a Source #

newtype Rot f1 f2 r a Source #

Constructors

Rot 

Fields

Instances

Functor r => Functor (Rot f1 f2 r) Source # 

Methods

fmap :: (a -> b) -> Rot f1 f2 r a -> Rot f1 f2 r b #

(<$) :: a -> Rot f1 f2 r b -> Rot f1 f2 r a #

Foldable r => Foldable (Rot f1 f2 r) Source # 

Methods

fold :: Monoid m => Rot f1 f2 r m -> m #

foldMap :: Monoid m => (a -> m) -> Rot f1 f2 r a -> m #

foldr :: (a -> b -> b) -> b -> Rot f1 f2 r a -> b #

foldr' :: (a -> b -> b) -> b -> Rot f1 f2 r a -> b #

foldl :: (b -> a -> b) -> b -> Rot f1 f2 r a -> b #

foldl' :: (b -> a -> b) -> b -> Rot f1 f2 r a -> b #

foldr1 :: (a -> a -> a) -> Rot f1 f2 r a -> a #

foldl1 :: (a -> a -> a) -> Rot f1 f2 r a -> a #

toList :: Rot f1 f2 r a -> [a] #

null :: Rot f1 f2 r a -> Bool #

length :: Rot f1 f2 r a -> Int #

elem :: Eq a => a -> Rot f1 f2 r a -> Bool #

maximum :: Ord a => Rot f1 f2 r a -> a #

minimum :: Ord a => Rot f1 f2 r a -> a #

sum :: Num a => Rot f1 f2 r a -> a #

product :: Num a => Rot f1 f2 r a -> a #

Traversable r => Traversable (Rot f1 f2 r) Source # 

Methods

traverse :: Applicative f => (a -> f b) -> Rot f1 f2 r a -> f (Rot f1 f2 r b) #

sequenceA :: Applicative f => Rot f1 f2 r (f a) -> f (Rot f1 f2 r a) #

mapM :: Monad m => (a -> m b) -> Rot f1 f2 r a -> m (Rot f1 f2 r b) #

sequence :: Monad m => Rot f1 f2 r (m a) -> m (Rot f1 f2 r a) #

Generic1 (Rot f1 f2 r) Source # 

Associated Types

type Rep1 (Rot f1 f2 r :: * -> *) :: * -> * #

Methods

from1 :: Rot f1 f2 r a -> Rep1 (Rot f1 f2 r) a #

to1 :: Rep1 (Rot f1 f2 r) a -> Rot f1 f2 r a #

Eq (r a) => Eq (Rot f1 f2 r a) Source # 

Methods

(==) :: Rot f1 f2 r a -> Rot f1 f2 r a -> Bool #

(/=) :: Rot f1 f2 r a -> Rot f1 f2 r a -> Bool #

Fractional (r a) => Fractional (Rot f1 f2 r a) Source # 

Methods

(/) :: Rot f1 f2 r a -> Rot f1 f2 r a -> Rot f1 f2 r a #

recip :: Rot f1 f2 r a -> Rot f1 f2 r a #

fromRational :: Rational -> Rot f1 f2 r a #

Num (r a) => Num (Rot f1 f2 r a) Source # 

Methods

(+) :: Rot f1 f2 r a -> Rot f1 f2 r a -> Rot f1 f2 r a #

(-) :: Rot f1 f2 r a -> Rot f1 f2 r a -> Rot f1 f2 r a #

(*) :: Rot f1 f2 r a -> Rot f1 f2 r a -> Rot f1 f2 r a #

negate :: Rot f1 f2 r a -> Rot f1 f2 r a #

abs :: Rot f1 f2 r a -> Rot f1 f2 r a #

signum :: Rot f1 f2 r a -> Rot f1 f2 r a #

fromInteger :: Integer -> Rot f1 f2 r a #

Ord (r a) => Ord (Rot f1 f2 r a) Source # 

Methods

compare :: Rot f1 f2 r a -> Rot f1 f2 r a -> Ordering #

(<) :: Rot f1 f2 r a -> Rot f1 f2 r a -> Bool #

(<=) :: Rot f1 f2 r a -> Rot f1 f2 r a -> Bool #

(>) :: Rot f1 f2 r a -> Rot f1 f2 r a -> Bool #

(>=) :: Rot f1 f2 r a -> Rot f1 f2 r a -> Bool #

max :: Rot f1 f2 r a -> Rot f1 f2 r a -> Rot f1 f2 r a #

min :: Rot f1 f2 r a -> Rot f1 f2 r a -> Rot f1 f2 r a #

Show (r a) => Show (Rot f1 f2 r a) Source # 

Methods

showsPrec :: Int -> Rot f1 f2 r a -> ShowS #

show :: Rot f1 f2 r a -> String #

showList :: [Rot f1 f2 r a] -> ShowS #

Generic (Rot f1 f2 r a) Source # 

Associated Types

type Rep (Rot f1 f2 r a) :: * -> * #

Methods

from :: Rot f1 f2 r a -> Rep (Rot f1 f2 r a) x #

to :: Rep (Rot f1 f2 r a) x -> Rot f1 f2 r a #

Storable (r a) => Storable (Rot f1 f2 r a) Source # 

Methods

sizeOf :: Rot f1 f2 r a -> Int #

alignment :: Rot f1 f2 r a -> Int #

peekElemOff :: Ptr (Rot f1 f2 r a) -> Int -> IO (Rot f1 f2 r a) #

pokeElemOff :: Ptr (Rot f1 f2 r a) -> Int -> Rot f1 f2 r a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (Rot f1 f2 r a) #

pokeByteOff :: Ptr b -> Int -> Rot f1 f2 r a -> IO () #

peek :: Ptr (Rot f1 f2 r a) -> IO (Rot f1 f2 r a) #

poke :: Ptr (Rot f1 f2 r a) -> Rot f1 f2 r a -> IO () #

Binary (r a) => Binary (Rot f1 f2 r a) Source # 

Methods

put :: Rot f1 f2 r a -> Put #

get :: Get (Rot f1 f2 r a) #

putList :: [Rot f1 f2 r a] -> Put #

Serialize (r a) => Serialize (Rot f1 f2 r a) Source # 

Methods

put :: Putter (Rot f1 f2 r a) #

get :: Get (Rot f1 f2 r a) #

type Rep1 (Rot f1 f2 r) Source # 
type Rep1 (Rot f1 f2 r) = D1 (MetaData "Rot" "SpatialMathT" "spatial-math-0.3.0.0-Dqp0VTsSbmHILyOQtucnEt" True) (C1 (MetaCons "Rot" PrefixI True) (S1 (MetaSel (Just Symbol "unRot") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 r)))
type Rep (Rot f1 f2 r a) Source # 
type Rep (Rot f1 f2 r a) = D1 (MetaData "Rot" "SpatialMathT" "spatial-math-0.3.0.0-Dqp0VTsSbmHILyOQtucnEt" True) (C1 (MetaCons "Rot" PrefixI True) (S1 (MetaSel (Just Symbol "unRot") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (r a))))

newtype V3T f a Source #

Constructors

V3T 

Fields

Instances

Functor (V3T f) Source # 

Methods

fmap :: (a -> b) -> V3T f a -> V3T f b #

(<$) :: a -> V3T f b -> V3T f a #

Applicative (V3T f) Source # 

Methods

pure :: a -> V3T f a #

(<*>) :: V3T f (a -> b) -> V3T f a -> V3T f b #

(*>) :: V3T f a -> V3T f b -> V3T f b #

(<*) :: V3T f a -> V3T f b -> V3T f a #

Foldable (V3T f) Source # 

Methods

fold :: Monoid m => V3T f m -> m #

foldMap :: Monoid m => (a -> m) -> V3T f a -> m #

foldr :: (a -> b -> b) -> b -> V3T f a -> b #

foldr' :: (a -> b -> b) -> b -> V3T f a -> b #

foldl :: (b -> a -> b) -> b -> V3T f a -> b #

foldl' :: (b -> a -> b) -> b -> V3T f a -> b #

foldr1 :: (a -> a -> a) -> V3T f a -> a #

foldl1 :: (a -> a -> a) -> V3T f a -> a #

toList :: V3T f a -> [a] #

null :: V3T f a -> Bool #

length :: V3T f a -> Int #

elem :: Eq a => a -> V3T f a -> Bool #

maximum :: Ord a => V3T f a -> a #

minimum :: Ord a => V3T f a -> a #

sum :: Num a => V3T f a -> a #

product :: Num a => V3T f a -> a #

Traversable (V3T f) Source # 

Methods

traverse :: Applicative f => (a -> f b) -> V3T f a -> f (V3T f b) #

sequenceA :: Applicative f => V3T f (f a) -> f (V3T f a) #

mapM :: Monad m => (a -> m b) -> V3T f a -> m (V3T f b) #

sequence :: Monad m => V3T f (m a) -> m (V3T f a) #

Generic1 (V3T f) Source # 

Associated Types

type Rep1 (V3T f :: * -> *) :: * -> * #

Methods

from1 :: V3T f a -> Rep1 (V3T f) a #

to1 :: Rep1 (V3T f) a -> V3T f a #

R3 (V3T f) Source # 

Methods

_z :: Functor f => (a -> f a) -> V3T f a -> f (V3T f a) #

_xyz :: Functor f => (V3 a -> f (V3 a)) -> V3T f a -> f (V3T f a) #

R2 (V3T f) Source # 

Methods

_y :: Functor f => (a -> f a) -> V3T f a -> f (V3T f a) #

_xy :: Functor f => (V2 a -> f (V2 a)) -> V3T f a -> f (V3T f a) #

R1 (V3T f) Source # 

Methods

_x :: Functor f => (a -> f a) -> V3T f a -> f (V3T f a) #

Metric (V3T f) Source # 

Methods

dot :: Num a => V3T f a -> V3T f a -> a #

quadrance :: Num a => V3T f a -> a #

qd :: Num a => V3T f a -> V3T f a -> a #

distance :: Floating a => V3T f a -> V3T f a -> a #

norm :: Floating a => V3T f a -> a #

signorm :: Floating a => V3T f a -> V3T f a #

Additive (V3T f) Source # 

Methods

zero :: Num a => V3T f a #

(^+^) :: Num a => V3T f a -> V3T f a -> V3T f a #

(^-^) :: Num a => V3T f a -> V3T f a -> V3T f a #

lerp :: Num a => a -> V3T f a -> V3T f a -> V3T f a #

liftU2 :: (a -> a -> a) -> V3T f a -> V3T f a -> V3T f a #

liftI2 :: (a -> b -> c) -> V3T f a -> V3T f b -> V3T f c #

Eq a => Eq (V3T f a) Source # 

Methods

(==) :: V3T f a -> V3T f a -> Bool #

(/=) :: V3T f a -> V3T f a -> Bool #

Fractional a => Fractional (V3T f a) Source # 

Methods

(/) :: V3T f a -> V3T f a -> V3T f a #

recip :: V3T f a -> V3T f a #

fromRational :: Rational -> V3T f a #

Num a => Num (V3T f a) Source # 

Methods

(+) :: V3T f a -> V3T f a -> V3T f a #

(-) :: V3T f a -> V3T f a -> V3T f a #

(*) :: V3T f a -> V3T f a -> V3T f a #

negate :: V3T f a -> V3T f a #

abs :: V3T f a -> V3T f a #

signum :: V3T f a -> V3T f a #

fromInteger :: Integer -> V3T f a #

Ord a => Ord (V3T f a) Source # 

Methods

compare :: V3T f a -> V3T f a -> Ordering #

(<) :: V3T f a -> V3T f a -> Bool #

(<=) :: V3T f a -> V3T f a -> Bool #

(>) :: V3T f a -> V3T f a -> Bool #

(>=) :: V3T f a -> V3T f a -> Bool #

max :: V3T f a -> V3T f a -> V3T f a #

min :: V3T f a -> V3T f a -> V3T f a #

Show a => Show (V3T f a) Source # 

Methods

showsPrec :: Int -> V3T f a -> ShowS #

show :: V3T f a -> String #

showList :: [V3T f a] -> ShowS #

Generic (V3T f a) Source # 

Associated Types

type Rep (V3T f a) :: * -> * #

Methods

from :: V3T f a -> Rep (V3T f a) x #

to :: Rep (V3T f a) x -> V3T f a #

Storable a => Storable (V3T f a) Source # 

Methods

sizeOf :: V3T f a -> Int #

alignment :: V3T f a -> Int #

peekElemOff :: Ptr (V3T f a) -> Int -> IO (V3T f a) #

pokeElemOff :: Ptr (V3T f a) -> Int -> V3T f a -> IO () #

peekByteOff :: Ptr b -> Int -> IO (V3T f a) #

pokeByteOff :: Ptr b -> Int -> V3T f a -> IO () #

peek :: Ptr (V3T f a) -> IO (V3T f a) #

poke :: Ptr (V3T f a) -> V3T f a -> IO () #

Binary a => Binary (V3T f a) Source # 

Methods

put :: V3T f a -> Put #

get :: Get (V3T f a) #

putList :: [V3T f a] -> Put #

Serialize a => Serialize (V3T f a) Source # 

Methods

put :: Putter (V3T f a) #

get :: Get (V3T f a) #

type Rep1 (V3T f) Source # 
type Rep1 (V3T f) = D1 (MetaData "V3T" "SpatialMathT" "spatial-math-0.3.0.0-Dqp0VTsSbmHILyOQtucnEt" True) (C1 (MetaCons "V3T" PrefixI True) (S1 (MetaSel (Just Symbol "unV") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 V3)))
type Rep (V3T f a) Source # 
type Rep (V3T f a) = D1 (MetaData "V3T" "SpatialMathT" "spatial-math-0.3.0.0-Dqp0VTsSbmHILyOQtucnEt" True) (C1 (MetaCons "V3T" PrefixI True) (S1 (MetaSel (Just Symbol "unV") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (V3 a))))

class R1 t where #

A space that has at least 1 basis vector _x.

Methods

_x :: Functor f => (a -> f a) -> t a -> f (t a) #

>>> V1 2 ^._x
2
>>> V1 2 & _x .~ 3
V1 3

Instances

R1 Identity 

Methods

_x :: Functor f => (a -> f a) -> Identity a -> f (Identity a) #

R1 V4 

Methods

_x :: Functor f => (a -> f a) -> V4 a -> f (V4 a) #

R1 V3 

Methods

_x :: Functor f => (a -> f a) -> V3 a -> f (V3 a) #

R1 V2 

Methods

_x :: Functor f => (a -> f a) -> V2 a -> f (V2 a) #

R1 V1 

Methods

_x :: Functor f => (a -> f a) -> V1 a -> f (V1 a) #

R1 (V3T f) # 

Methods

_x :: Functor f => (a -> f a) -> V3T f a -> f (V3T f a) #

class R1 t => R2 t where #

A space that distinguishes 2 orthogonal basis vectors _x and _y, but may have more.

Methods

_y :: Functor f => (a -> f a) -> t a -> f (t a) #

>>> V2 1 2 ^._y
2
>>> V2 1 2 & _y .~ 3
V2 1 3

_xy :: Functor f => (V2 a -> f (V2 a)) -> t a -> f (t a) #

Instances

R2 V4 

Methods

_y :: Functor f => (a -> f a) -> V4 a -> f (V4 a) #

_xy :: Functor f => (V2 a -> f (V2 a)) -> V4 a -> f (V4 a) #

R2 V3 

Methods

_y :: Functor f => (a -> f a) -> V3 a -> f (V3 a) #

_xy :: Functor f => (V2 a -> f (V2 a)) -> V3 a -> f (V3 a) #

R2 V2 

Methods

_y :: Functor f => (a -> f a) -> V2 a -> f (V2 a) #

_xy :: Functor f => (V2 a -> f (V2 a)) -> V2 a -> f (V2 a) #

R2 (V3T f) # 

Methods

_y :: Functor f => (a -> f a) -> V3T f a -> f (V3T f a) #

_xy :: Functor f => (V2 a -> f (V2 a)) -> V3T f a -> f (V3T f a) #

class R2 t => R3 t where #

A space that distinguishes 3 orthogonal basis vectors: _x, _y, and _z. (It may have more)

Methods

_z :: Functor f => (a -> f a) -> t a -> f (t a) #

>>> V3 1 2 3 ^. _z
3

_xyz :: Functor f => (V3 a -> f (V3 a)) -> t a -> f (t a) #

Instances

R3 V4 

Methods

_z :: Functor f => (a -> f a) -> V4 a -> f (V4 a) #

_xyz :: Functor f => (V3 a -> f (V3 a)) -> V4 a -> f (V4 a) #

R3 V3 

Methods

_z :: Functor f => (a -> f a) -> V3 a -> f (V3 a) #

_xyz :: Functor f => (V3 a -> f (V3 a)) -> V3 a -> f (V3 a) #

R3 (V3T f) # 

Methods

_z :: Functor f => (a -> f a) -> V3T f a -> f (V3T f a) #

_xyz :: Functor f => (V3 a -> f (V3 a)) -> V3T f a -> f (V3T f a) #

cross :: Num a => V3T f a -> V3T f a -> V3T f a Source #

orthonormalize :: Floating a => Rot f1 f2 (V3 :. V3) a -> Rot f1 f2 (V3 :. V3) a Source #

dcmOfQuat :: Num a => Rot f g Quaternion a -> Rot f g (V3 :. V3) a Source #

dcmOfEuler321 :: Floating a => Rot f g Euler a -> Rot f g (V3 :. V3) a Source #

quatOfDcm :: Floating a => Rot f g (V3 :. V3) a -> Rot f g Quaternion a Source #

euler321OfDcm :: (ArcTan2 a, Ord a) => Rot f g (V3 :. V3) a -> Rot f g Euler a Source #

unsafeEuler321OfDcm :: ArcTan2 a => Rot f g (V3 :. V3) a -> Rot f g Euler a Source #

euler321OfQuat :: (ArcTan2 a, Ord a) => Rot f g Quaternion a -> Rot f g Euler a Source #

re-export for convenience

newtype (g :. f) a :: (* -> *) -> (* -> *) -> * -> * infixl 9 #

Composition of unary type constructors

There are (at least) two useful Monoid instances, so you'll have to pick one and type-specialize it (filling in all or parts of g and/or f).

    -- standard Monoid instance for Applicative applied to Monoid
    instance (Applicative (g :. f), Monoid a) => Monoid ((g :. f) a) where
      { mempty = pure mempty; mappend = liftA2 mappend }
    -- Especially handy when g is a Monoid_f.
    instance Monoid (g (f a)) => Monoid ((g :. f) a) where
      { mempty = O mempty; mappend = inO2 mappend }

Corresponding to the first and second definitions above,

    instance (Applicative g, Monoid_f f) => Monoid_f (g :. f) where
      { mempty_f = O (pure mempty_f); mappend_f = inO2 (liftA2 mappend_f) }
    instance Monoid_f g => Monoid_f (g :. f) where
      { mempty_f = O mempty_f; mappend_f = inO2 mappend_f }

Similarly, there are two useful Functor instances and two useful ContraFunctor instances.

    instance (      Functor g,       Functor f) => Functor (g :. f) where fmap = fmapFF
    instance (ContraFunctor g, ContraFunctor f) => Functor (g :. f) where fmap = fmapCC

    instance (      Functor g, ContraFunctor f) => ContraFunctor (g :. f) where contraFmap = contraFmapFC
    instance (ContraFunctor g,       Functor f) => ContraFunctor (g :. f) where contraFmap = contraFmapCF

However, it's such a bother to define the Functor instances per composition type, I've left the fmapFF case in. If you want the fmapCC one, you're out of luck for now. I'd love to hear a good solution. Maybe someday Haskell will do Prolog-style search for instances, subgoaling the constraints, rather than just matching instance heads.

Constructors

O (g (f a)) 

Instances

(Functor g, Functor f) => Functor ((:.) g f) 

Methods

fmap :: (a -> b) -> (g :. f) a -> (g :. f) b #

(<$) :: a -> (g :. f) b -> (g :. f) a #

(Applicative g, Applicative f) => Applicative ((:.) g f) 

Methods

pure :: a -> (g :. f) a #

(<*>) :: (g :. f) (a -> b) -> (g :. f) a -> (g :. f) b #

(*>) :: (g :. f) a -> (g :. f) b -> (g :. f) b #

(<*) :: (g :. f) a -> (g :. f) b -> (g :. f) a #

(Foldable g, Foldable f, Functor g) => Foldable ((:.) g f) 

Methods

fold :: Monoid m => (g :. f) m -> m #

foldMap :: Monoid m => (a -> m) -> (g :. f) a -> m #

foldr :: (a -> b -> b) -> b -> (g :. f) a -> b #

foldr' :: (a -> b -> b) -> b -> (g :. f) a -> b #

foldl :: (b -> a -> b) -> b -> (g :. f) a -> b #

foldl' :: (b -> a -> b) -> b -> (g :. f) a -> b #

foldr1 :: (a -> a -> a) -> (g :. f) a -> a #

foldl1 :: (a -> a -> a) -> (g :. f) a -> a #

toList :: (g :. f) a -> [a] #

null :: (g :. f) a -> Bool #

length :: (g :. f) a -> Int #

elem :: Eq a => a -> (g :. f) a -> Bool #

maximum :: Ord a => (g :. f) a -> a #

minimum :: Ord a => (g :. f) a -> a #

sum :: Num a => (g :. f) a -> a #

product :: Num a => (g :. f) a -> a #

(Traversable g, Traversable f) => Traversable ((:.) g f) 

Methods

traverse :: Applicative f => (a -> f b) -> (g :. f) a -> f ((g :. f) b) #

sequenceA :: Applicative f => (g :. f) (f a) -> f ((g :. f) a) #

mapM :: Monad m => (a -> m b) -> (g :. f) a -> m ((g :. f) b) #

sequence :: Monad m => (g :. f) (m a) -> m ((g :. f) a) #

Functor g => Generic1 ((:.) g f) 

Associated Types

type Rep1 ((:.) g f :: * -> *) :: * -> * #

Methods

from1 :: (g :. f) a -> Rep1 (g :. f) a #

to1 :: Rep1 (g :. f) a -> (g :. f) a #

Num a => Rotation ((:.) V3 V3) a Source # 

Methods

compose :: Rot f1 f2 (V3 :. V3) a -> Rot f2 f3 (V3 :. V3) a -> Rot f1 f3 (V3 :. V3) a Source #

rot :: Rot f1 f2 (V3 :. V3) a -> V3T f1 a -> V3T f2 a Source #

rot' :: Rot f1 f2 (V3 :. V3) a -> V3T f2 a -> V3T f1 a Source #

transpose :: Rot f1 f2 (V3 :. V3) a -> Rot f2 f1 (V3 :. V3) a Source #

identity :: Rot f1 f2 (V3 :. V3) a Source #

Eq (g (f a)) => Eq ((:.) g f a) 

Methods

(==) :: (g :. f) a -> (g :. f) a -> Bool #

(/=) :: (g :. f) a -> (g :. f) a -> Bool #

Ord (g (f a)) => Ord ((:.) g f a) 

Methods

compare :: (g :. f) a -> (g :. f) a -> Ordering #

(<) :: (g :. f) a -> (g :. f) a -> Bool #

(<=) :: (g :. f) a -> (g :. f) a -> Bool #

(>) :: (g :. f) a -> (g :. f) a -> Bool #

(>=) :: (g :. f) a -> (g :. f) a -> Bool #

max :: (g :. f) a -> (g :. f) a -> (g :. f) a #

min :: (g :. f) a -> (g :. f) a -> (g :. f) a #

Show (g (f a)) => Show ((:.) g f a) 

Methods

showsPrec :: Int -> (g :. f) a -> ShowS #

show :: (g :. f) a -> String #

showList :: [(g :. f) a] -> ShowS #

Generic ((:.) g f a) 

Associated Types

type Rep ((:.) g f a) :: * -> * #

Methods

from :: (g :. f) a -> Rep ((g :. f) a) x #

to :: Rep ((g :. f) a) x -> (g :. f) a #

type Rep1 ((:.) g f) 
type Rep1 ((:.) g f) = D1 (MetaData ":." "Control.Compose" "TypeCompose-0.9.12-CUb55uJGeK65Htq0yqldJX" True) (C1 (MetaCons "O" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) ((:.:) g (Rec1 f))))
type Rep ((:.) g f a) 
type Rep ((:.) g f a) = D1 (MetaData ":." "Control.Compose" "TypeCompose-0.9.12-CUb55uJGeK65Htq0yqldJX" True) (C1 (MetaCons "O" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (g (f a)))))

unO :: (:.) g f a -> g (f a) #

Unwrap a '(:.)'.