vector-space-0.15: Vector & affine spaces, linear maps, and derivatives

Data.Cross

Description

Cross products and normals

Synopsis

# Documentation

class HasNormal v where #

Thing with a normal vector (not necessarily normalized).

Methods

normalVec :: v -> v #

Instances
 (VectorSpace s, HasBasis s, HasTrie (Basis s), HasNormal (Two s :> Three s)) => HasNormal (Three (Two s :> s)) # Instance detailsDefined in Data.Cross MethodsnormalVec :: Three (Two s :> s) -> Three (Two s :> s) # (VectorSpace s, HasBasis s, HasTrie (Basis s), Basis s ~ ()) => HasNormal (Two (One s :> s)) # Instance detailsDefined in Data.Cross MethodsnormalVec :: Two (One s :> s) -> Two (One s :> s) # (Num s, HasTrie (Basis (s, s)), HasBasis s, Basis s ~ ()) => HasNormal (Two s :> Three s) # Instance detailsDefined in Data.Cross MethodsnormalVec :: (Two s :> Three s) -> Two s :> Three s # (HasBasis s, HasTrie (Basis s), Basis s ~ ()) => HasNormal (One s :> Two s) # Instance detailsDefined in Data.Cross MethodsnormalVec :: (One s :> Two s) -> One s :> Two s #

normal :: (HasNormal v, InnerSpace v, Floating (Scalar v)) => v -> v #

Normalized normal vector. See also cross.

type One s = s #

Singleton

type Two s = (s, s) #

Homogeneous pair

type Three s = (s, s, s) #

Homogeneous triple

class HasCross2 v where #

Cross product of various forms of 2D vectors

Methods

cross2 :: v -> v #

Instances
 AdditiveGroup u => HasCross2 (u, u) # Instance detailsDefined in Data.Cross Methodscross2 :: (u, u) -> (u, u) # (HasTrie (Basis a), HasCross2 v) => HasCross2 (a :> v) # Instance detailsDefined in Data.Cross Methodscross2 :: (a :> v) -> a :> v #

class HasCross3 v where #

Cross product of various forms of 3D vectors

Methods

cross3 :: v -> v -> v #

Instances
 (HasBasis a, HasTrie (Basis a), VectorSpace v, HasCross3 v) => HasCross3 (a :> v) # Instance detailsDefined in Data.Cross Methodscross3 :: (a :> v) -> (a :> v) -> a :> v # Num s => HasCross3 (s, s, s) # Instance detailsDefined in Data.Cross Methodscross3 :: (s, s, s) -> (s, s, s) -> (s, s, s) #