AC-Vector-2.4.0: Efficient geometric vectors and transformations.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Vector.V3

Description

3-dimensional vectors with vector arithmetic.

Synopsis

Documentation

data Vector3 Source #

Constructors

Vector3 

Fields

Instances

Instances details
BasicVector Vector3 Source # 
Instance details

Defined in Data.Vector.V3

Vector Vector3 Source # 
Instance details

Defined in Data.Vector.V3

Num Vector3 Source # 
Instance details

Defined in Data.Vector.V3

Fractional Vector3 Source # 
Instance details

Defined in Data.Vector.V3

Show Vector3 Source # 
Instance details

Defined in Data.Vector.V3

Eq Vector3 Source # 
Instance details

Defined in Data.Vector.V3

Methods

(==) :: Vector3 -> Vector3 -> Bool #

(/=) :: Vector3 -> Vector3 -> Bool #

vcross :: Vector3 -> Vector3 -> Vector3 Source #

Take the cross product of two 3D vectors. This produces a new 3D vector that is perpendicular to the plane of the first two vectors, and who's length is equal to the sine of the angle between those vectors multiplied by their lengths.

Note that a `vcross` b = negate (b `vcross` a).