linear-1.20.1: Linear Algebra

Copyright(C) 2012-2015 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellTrustworthy
LanguageHaskell98

Linear.Quaternion

Description

Quaternions

Synopsis

Documentation

data Quaternion a Source

Quaternions

Constructors

Quaternion !a !(V3 a) 

Instances

Monad Quaternion 
Functor Quaternion 
MonadFix Quaternion 
Applicative Quaternion 
Foldable Quaternion 
Traversable Quaternion 
Generic1 Quaternion 
Distributive Quaternion 
Representable Quaternion 
MonadZip Quaternion 
Serial1 Quaternion 
Apply Quaternion 
Bind Quaternion 
Eq1 Quaternion 
Ord1 Quaternion 
Read1 Quaternion 
Show1 Quaternion 
Additive Quaternion 
Metric Quaternion 
Hamiltonian Quaternion 
Complicated Quaternion 
Trace Quaternion 
Affine Quaternion 
Unbox a => Vector Vector (Quaternion a) 
Unbox a => MVector MVector (Quaternion a) 
(Num r, TrivialConjugate r) => Coalgebra r (E Quaternion) 
(Num r, TrivialConjugate r) => Algebra r (E Quaternion) 
Eq a => Eq (Quaternion a) 
RealFloat a => Floating (Quaternion a) 
RealFloat a => Fractional (Quaternion a) 
Data a => Data (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) 
Storable a => Storable (Quaternion a) 
Binary a => Binary (Quaternion a) 
Serial a => Serial (Quaternion a) 
Serialize a => Serialize (Quaternion a) 
NFData a => NFData (Quaternion a) 
Hashable a => Hashable (Quaternion a) 
Unbox a => Unbox (Quaternion a) 
Ixed (Quaternion a) 
(RealFloat a, Epsilon a) => Epsilon (Quaternion a) 
(Conjugate a, RealFloat a) => Conjugate (Quaternion a) 
FunctorWithIndex (E Quaternion) Quaternion 
FoldableWithIndex (E Quaternion) Quaternion 
TraversableWithIndex (E Quaternion) Quaternion 
Each (Quaternion a) (Quaternion b) a b 
Typeable (* -> *) Quaternion 
type Rep1 Quaternion 
type Rep Quaternion = E Quaternion 
type Diff Quaternion = Quaternion 
data MVector s (Quaternion a) = MV_Quaternion !Int (MVector s a) 
type Rep (Quaternion a) 
data Vector (Quaternion a) = V_Quaternion !Int (Vector a) 
type Index (Quaternion a) = E Quaternion 
type IxValue (Quaternion a) = a 

class Complicated t where Source

A vector space that includes the basis elements _e and _i

Minimal complete definition

Nothing

Methods

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

class Complicated t => Hamiltonian t where Source

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

Minimal complete definition

Nothing

Methods

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

_ijk :: Lens' (t a) (V3 a) 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.