Safe Haskell | Safe-Inferred |
---|
Geometric functions concerning vectors.
- type Vector = Point
- magV :: Vector -> Float
- argV :: Vector -> Float
- dotV :: Vector -> Vector -> Float
- detV :: Vector -> Vector -> Float
- mulSV :: Float -> Vector -> Vector
- rotateV :: Float -> Vector -> Vector
- angleVV :: Vector -> Vector -> Float
- normaliseV :: Vector -> Vector
- unitVectorAtAngle :: Float -> Vector
Documentation
rotateV :: Float -> Vector -> VectorSource
Rotate a vector by an angle (in radians). +ve angle is counter-clockwise.
normaliseV :: Vector -> VectorSource
Normalise a vector, so it has a magnitude of 1.
unitVectorAtAngle :: Float -> VectorSource
Produce a unit vector at a given angle relative to the +ve x-axis. The provided angle is in radians.