linear-1.20.7: Linear Algebra

Copyright | (C) 2012-2015 Edward Kmett
License | BSD-style (see the file LICENSE)
Maintainer | Edward Kmett <ekmett@gmail.com>
Stability | experimental
Portability | non-portable
Safe Haskell | Trustworthy
Language | Haskell98

Linear.Quaternion

Description

Quaternions

Synopsis

- data Quaternion a = Quaternion !a !(V3 a)
- class Complicated t where
- class Complicated t => Hamiltonian t where
- ee :: Complicated t => E t
- ei :: Complicated t => E t
- ej :: Hamiltonian t => E t
- ek :: Hamiltonian t => E t
- slerp :: RealFloat a => Quaternion a -> Quaternion a -> a -> Quaternion a
- asinq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a
- acosq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a
- atanq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a
- asinhq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a
- acoshq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a
- atanhq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a
- absi :: Floating a => Quaternion a -> a
- pow :: RealFloat a => Quaternion a -> a -> Quaternion a
- rotate :: (Conjugate a, RealFloat a) => Quaternion a -> V3 a -> V3 a
- axisAngle :: (Epsilon a, Floating a) => V3 a -> a -> Quaternion a

# Documentation

data Quaternion a Source #

Quaternions

Constructors

Quaternion !a !(V3 a) |

Instances

Monad Quaternion Source # |
Methods (>>=) :: Quaternion a -> (a -> Quaternion b) -> Quaternion b # (>>) :: Quaternion a -> Quaternion b -> Quaternion b # return :: a -> Quaternion a # fail :: String -> Quaternion a #
Functor Quaternion Source # |
Methods fmap :: (a -> b) -> Quaternion a -> Quaternion b # (<$) :: a -> Quaternion b -> Quaternion a #
MonadFix Quaternion Source # |
Methods mfix :: (a -> Quaternion a) -> Quaternion a #
Applicative Quaternion Source # |
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 Source # |

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 Source # |
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 Source # |
Associated Types type Rep1 (Quaternion :: * -> *) :: * -> * # Methods from1 :: Quaternion a -> Rep1 Quaternion a # to1 :: Rep1 Quaternion a -> Quaternion a #
Distributive Quaternion Source # |
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 Source # |
Associated Types type Rep (Quaternion :: * -> *) :: * # Methods tabulate :: (Rep Quaternion -> a) -> Quaternion a # index :: Quaternion a -> Rep Quaternion -> a #
Eq1 Quaternion Source # |
Methods liftEq :: (a -> b -> Bool) -> Quaternion a -> Quaternion b -> Bool #
Ord1 Quaternion Source # |
Methods liftCompare :: (a -> b -> Ordering) -> Quaternion a -> Quaternion b -> Ordering #
Read1 Quaternion Source # |
Methods liftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Quaternion a) # liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Quaternion a] #
Show1 Quaternion Source # |
Methods liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Quaternion a -> ShowS # liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Quaternion a] -> ShowS #
MonadZip Quaternion Source # |
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 Source # |
Methods serializeWith :: MonadPut m => (a -> m ()) -> Quaternion a -> m () # deserializeWith :: MonadGet m => m a -> m (Quaternion a) #
Apply Quaternion Source # |
Methods (<.>) :: Quaternion (a -> b) -> Quaternion a -> Quaternion b # (.>) :: Quaternion a -> Quaternion b -> Quaternion b # (<.) :: Quaternion a -> Quaternion b -> Quaternion a #
Bind Quaternion Source # |
Methods (>>-) :: Quaternion a -> (a -> Quaternion b) -> Quaternion b # join :: Quaternion (Quaternion a) -> Quaternion a #
Additive Quaternion Source # |

Methods

zero :: Num a => Quaternion a Source #

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

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

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

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

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

Metric Quaternion Source # |
Methods dot :: Num a => Quaternion a -> Quaternion a -> a Source # quadrance :: Num a => Quaternion a -> a Source # qd :: Num a => Quaternion a -> Quaternion a -> a Source # distance :: Floating a => Quaternion a -> Quaternion a -> a Source # norm :: Floating a => Quaternion a -> a Source # signorm :: Floating a => Quaternion a -> Quaternion a Source #
Finite Quaternion Source # |
Associated Types type Size (Quaternion :: * -> *) :: Nat Source # Methods toV :: Quaternion a -> V Nat (Size Quaternion) a Source # fromV :: V Nat (Size Quaternion) a -> Quaternion a Source #
Hamiltonian Quaternion Source # |
Methods _j :: Functor f => (a -> f a) -> Quaternion a -> f (Quaternion a) Source # _k :: Functor f => (a -> f a) -> Quaternion a -> f (Quaternion a) Source # _ijk :: Functor f => (V3 a -> f (V3 a)) -> Quaternion a -> f (Quaternion a) Source #
Complicated Quaternion Source # |
Methods _e :: Functor f => (a -> f a) -> Quaternion a -> f (Quaternion a) Source # _i :: Functor f => (a -> f a) -> Quaternion a -> f (Quaternion a) Source #
Trace Quaternion Source # |
Methods trace :: Num a => Quaternion (Quaternion a) -> a Source # diagonal :: Quaternion (Quaternion a) -> Quaternion a Source #
Affine Quaternion Source # |
Associated Types type Diff (Quaternion :: * -> *) :: * -> * Source # Methods (.-.) :: Num a => Quaternion a -> Quaternion a -> Diff Quaternion a Source # (.+^) :: Num a => Quaternion a -> Diff Quaternion a -> Quaternion a Source # (.-^) :: Num a => Quaternion a -> Diff Quaternion a -> Quaternion a Source #
Unbox a => Vector Vector (Quaternion a) Source # |

Methods

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

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

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

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

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

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

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

Unbox a => MVector MVector (Quaternion a) Source # |

Methods

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

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

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

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

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

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

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

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

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

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

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

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

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

(Num r, TrivialConjugate r) => Coalgebra r (E Quaternion) Source # |
Methods comult :: (E Quaternion -> r) -> E Quaternion -> E Quaternion -> r Source # counital :: (E Quaternion -> r) -> r Source #
(Num r, TrivialConjugate r) => Algebra r (E Quaternion) Source # |
Methods mult :: (E Quaternion -> E Quaternion -> r) -> E Quaternion -> r Source # unital :: r -> E Quaternion -> r Source #
Eq a => Eq (Quaternion a) Source # |
Methods (==) :: Quaternion a -> Quaternion a -> Bool # (/=) :: Quaternion a -> Quaternion a -> Bool #
RealFloat a => Floating (Quaternion a) Source # |

Methods

pi :: Quaternion a #

exp :: Quaternion a -> Quaternion a #

log :: Quaternion a -> Quaternion a #

sqrt :: Quaternion a -> Quaternion a #

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

logBase :: Quaternion a -> Quaternion a -> Quaternion a #

sin :: Quaternion a -> Quaternion a #

cos :: Quaternion a -> Quaternion a #

tan :: Quaternion a -> Quaternion a #

asin :: Quaternion a -> Quaternion a #

acos :: Quaternion a -> Quaternion a #

atan :: Quaternion a -> Quaternion a #

sinh :: Quaternion a -> Quaternion a #

cosh :: Quaternion a -> Quaternion a #

tanh :: Quaternion a -> Quaternion a #

asinh :: Quaternion a -> Quaternion a #

acosh :: Quaternion a -> Quaternion a #

atanh :: Quaternion a -> Quaternion a #

log1p :: Quaternion a -> Quaternion a #

expm1 :: Quaternion a -> Quaternion a #

log1pexp :: Quaternion a -> Quaternion a #

log1mexp :: Quaternion a -> Quaternion a #

RealFloat a => Fractional (Quaternion a) Source # |
Methods (/) :: Quaternion a -> Quaternion a -> Quaternion a # recip :: Quaternion a -> Quaternion a # fromRational :: Rational -> Quaternion a #
Data a => Data (Quaternion a) Source # |

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) Source # |
Methods (+) :: Quaternion a -> Quaternion a -> Quaternion a # (-) :: Quaternion a -> Quaternion a -> Quaternion a # (*) :: Quaternion a -> Quaternion a -> Quaternion a # negate :: Quaternion a -> Quaternion a # abs :: Quaternion a -> Quaternion a # signum :: Quaternion a -> Quaternion a # fromInteger :: Integer -> Quaternion a #
Ord a => Ord (Quaternion a) Source # |
Methods compare :: Quaternion a -> Quaternion a -> Ordering # (<) :: Quaternion a -> Quaternion a -> Bool # (<=) :: Quaternion a -> Quaternion a -> Bool # (>) :: Quaternion a -> Quaternion a -> Bool # (>=) :: Quaternion a -> Quaternion a -> Bool # max :: Quaternion a -> Quaternion a -> Quaternion a # min :: Quaternion a -> Quaternion a -> Quaternion a #
Read a => Read (Quaternion a) Source # |
Methods readsPrec :: Int -> ReadS (Quaternion a) # readList :: ReadS [Quaternion a] # readPrec :: ReadPrec (Quaternion a) # readListPrec :: ReadPrec [Quaternion a] #
Show a => Show (Quaternion a) Source # |
Methods showsPrec :: Int -> Quaternion a -> ShowS # show :: Quaternion a -> String # showList :: [Quaternion a] -> ShowS #
Ix a => Ix (Quaternion a) Source # |
Methods range :: (Quaternion a, Quaternion a) -> [Quaternion a] # index :: (Quaternion a, Quaternion a) -> Quaternion a -> Int # unsafeIndex :: (Quaternion a, Quaternion a) -> Quaternion a -> Int inRange :: (Quaternion a, Quaternion a) -> Quaternion a -> Bool # rangeSize :: (Quaternion a, Quaternion a) -> Int # unsafeRangeSize :: (Quaternion a, Quaternion a) -> Int
Generic (Quaternion a) Source # |
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) Source # |

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) Source # |
Methods put :: Quaternion a -> Put # get :: Get (Quaternion a) # putList :: [Quaternion a] -> Put #
Serial a => Serial (Quaternion a) Source # |
Methods serialize :: MonadPut m => Quaternion a -> m () # deserialize :: MonadGet m => m (Quaternion a) #
Serialize a => Serialize (Quaternion a) Source # |
Methods put :: Putter (Quaternion a) # get :: Get (Quaternion a) #
NFData a => NFData (Quaternion a) Source # |
Methods rnf :: Quaternion a -> () #
Hashable a => Hashable (Quaternion a) Source # |
Methods hashWithSalt :: Int -> Quaternion a -> Int # hash :: Quaternion a -> Int #
Unbox a => Unbox (Quaternion a) Source # |
Ixed (Quaternion a) Source # |
Methods ix :: Index (Quaternion a) -> Traversal' (Quaternion a) (IxValue (Quaternion a)) #
(RealFloat a, Epsilon a) => Epsilon (Quaternion a) Source # |
Methods nearZero :: Quaternion a -> Bool Source #
(Conjugate a, RealFloat a) => Conjugate (Quaternion a) Source # |
Methods conjugate :: Quaternion a -> Quaternion a Source #
FunctorWithIndex (E Quaternion) Quaternion Source # |
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 Source # |

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 Source # |
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 Source # |
Methods each :: Traversal (Quaternion a) (Quaternion b) a b #
type Rep1 Quaternion Source # |
type Rep1 Quaternion = D1 (MetaData "Quaternion" "Linear.Quaternion" "linear-1.20.7-CvaXC2ebC1zHQ7FJwFrAk8" False) (C1 (MetaCons "Quaternion" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) Par1) (S1 (MetaSel (Nothing Symbol) SourceUnpack SourceStrict DecidedUnpack) (Rec1 V3))))
type Rep Quaternion Source # |
type Rep Quaternion = E Quaternion
type Size Quaternion Source # |
type Size Quaternion = 4
type Diff Quaternion Source # |
type Diff Quaternion = Quaternion
data MVector s (Quaternion a) Source # |
data MVector s (Quaternion a) = MV_Quaternion !Int (MVector s a)
type Rep (Quaternion a) Source # |
type Rep (Quaternion a) = D1 (MetaData "Quaternion" "Linear.Quaternion" "linear-1.20.7-CvaXC2ebC1zHQ7FJwFrAk8" False) (C1 (MetaCons "Quaternion" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 a)) (S1 (MetaSel (Nothing Symbol) SourceUnpack SourceStrict DecidedUnpack) (Rec0 (V3 a)))))
data Vector (Quaternion a) Source # |
data Vector (Quaternion a) = V_Quaternion !Int (Vector a)
type Index (Quaternion a) Source # |
type Index (Quaternion a) = E Quaternion
type IxValue (Quaternion a) Source # |
type IxValue (Quaternion a) = a

class Complicated t where Source #

A vector space that includes the basis elements `_e` and `_i`

Methods

_e, _i :: Lens' (t a) a Source #

Instances

Complicated Complex Source # |
Methods _e :: Functor f => (a -> f a) -> Complex a -> f (Complex a) Source # _i :: Functor f => (a -> f a) -> Complex a -> f (Complex a) Source #
Complicated Quaternion Source # |
Methods _e :: Functor f => (a -> f a) -> Quaternion a -> f (Quaternion a) Source # _i :: Functor f => (a -> f a) -> Quaternion a -> f (Quaternion a) Source #

class Complicated t => Hamiltonian t where Source #

A vector space that includes the basis elements `_e`, `_i`, `_j` and `_k`

Methods

_j, _k :: Lens' (t a) a Source #

_ijk :: Lens' (t a) (V3 a) Source #

Instances

Hamiltonian Quaternion Source # |
Methods _j :: Functor f => (a -> f a) -> Quaternion a -> f (Quaternion a) Source # _k :: Functor f => (a -> f a) -> Quaternion a -> f (Quaternion a) Source # _ijk :: Functor f => (V3 a -> f (V3 a)) -> Quaternion a -> f (Quaternion a) Source #

ee :: Complicated t => E t Source #

ei :: Complicated t => E t Source #

ej :: Hamiltonian t => E t Source #

ek :: Hamiltonian t => E t Source #

slerp :: RealFloat a => Quaternion a -> Quaternion a -> a -> Quaternion a Source #

Spherical linear interpolation between two quaternions.

asinq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a Source #

`asin` with a specified branch cut.

acosq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a Source #

`acos` with a specified branch cut.

atanq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a Source #

`atan` with a specified branch cut.

asinhq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a Source #

`asinh` with a specified branch cut.

acoshq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a Source #

`acosh` with a specified branch cut.

atanhq :: RealFloat a => Quaternion a -> Quaternion a -> Quaternion a Source #

`atanh` with a specified branch cut.

absi :: Floating a => Quaternion a -> a Source #

norm of the imaginary component

pow :: RealFloat a => Quaternion a -> a -> Quaternion a Source #

raise a `Quaternion` to a scalar power

rotate :: (Conjugate a, RealFloat a) => Quaternion a -> V3 a -> V3 a Source #

Apply a rotation to a vector.

axisAngle :: (Epsilon a, Floating a) => V3 a -> a -> Quaternion a Source #

``axisAngle` axis theta` builds a `Quaternion` representing a rotation of `theta` radians about `axis`.