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 | Haskell2010 |
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
Quaternion !a !(V3 a) |
Instances
class Complicated t where Source #
Instances
Complicated Complex Source # | |
Complicated Quaternion Source # | |
Defined in Linear.Quaternion _e :: Lens' (Quaternion a) a Source # _i :: Lens' (Quaternion a) a Source # |
class Complicated t => Hamiltonian t where Source #
Instances
Hamiltonian Quaternion Source # | |
Defined in Linear.Quaternion |
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 #
builds a axisAngle
axis thetaQuaternion
representing a
rotation of theta
radians about axis
.