Safe Haskell | None |
---|---|

Language | Haskell98 |

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
- normalizeV :: Vector -> Vector
- unitVectorAtAngle :: Float -> Vector

# Documentation

rotateV :: Float -> Vector -> Vector Source

Rotate a vector by an angle (in radians). +ve angle is counter-clockwise.

angleVV :: Vector -> Vector -> Float Source

Compute the inner angle (in radians) between two vectors.

normalizeV :: Vector -> Vector Source

Normalise a vector, so it has a magnitude of 1.

unitVectorAtAngle :: Float -> Vector Source

Produce a unit vector at a given angle relative to the +ve x-axis. The provided angle is in radians.