vector-space-0.10.4: 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).

Minimal complete definition

normalVec

Methods

normalVec :: v -> v #

Instances

 (VectorSpace s, HasBasis s, HasTrie (Basis s), HasNormal ((:>) (Two s) (Three s))) => HasNormal (Three ((:>) (Two s) s)) # MethodsnormalVec :: Three (Two s :> s) -> Three (Two s :> s) # (VectorSpace s, HasBasis s, HasTrie (Basis s), (~) * (Basis s) ()) => HasNormal (Two ((:>) (One s) s)) # MethodsnormalVec :: Two (One s :> s) -> Two (One s :> s) # (Num s, HasTrie (Basis (s, s)), HasBasis s, (~) * (Basis s) ()) => HasNormal ((:>) (Two s) (Three s)) # MethodsnormalVec :: (Two s :> Three s) -> Two s :> Three s # (HasBasis s, HasTrie (Basis s), (~) * (Basis s) ()) => HasNormal ((:>) (One s) (Two s)) # 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

Minimal complete definition

cross2

Methods

cross2 :: v -> v #

Instances

 AdditiveGroup u => HasCross2 (u, u) # Methodscross2 :: (u, u) -> (u, u) # (HasTrie (Basis a), HasCross2 v) => HasCross2 ((:>) a v) # Methodscross2 :: (a :> v) -> a :> v #

class HasCross3 v where #

Cross product of various forms of 3D vectors

Minimal complete definition

cross3

Methods

cross3 :: v -> v -> v #

Instances

 (HasBasis a, HasTrie (Basis a), VectorSpace v, HasCross3 v) => HasCross3 ((:>) a v) # Methodscross3 :: (a :> v) -> (a :> v) -> a :> v # Num s => HasCross3 (s, s, s) # Methodscross3 :: (s, s, s) -> (s, s, s) -> (s, s, s) #