linear-1.20.7: Linear Algebra

Linear.Quaternion

Description

Quaternions

Synopsis

# Documentation

data Quaternion a #

Quaternions

Constructors

 Quaternion !a !(V3 a)

Instances

class Complicated t where #

A vector space that includes the basis elements _e and _i

Methods

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

Instances

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

class Complicated t => Hamiltonian t where #

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

Methods

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

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

Instances

 # 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) #

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 #

Spherical linear interpolation between two quaternions.

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

asin with a specified branch cut.

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

acos with a specified branch cut.

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

atan with a specified branch cut.

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

asinh with a specified branch cut.

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

acosh with a specified branch cut.

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

atanh with a specified branch cut.

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

norm of the imaginary component

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

raise a Quaternion to a scalar power

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

Apply a rotation to a vector.

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

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