gloss-1.12.0.0: Painless 2D vector graphics, animations and simulations.

Graphics.Gloss.Data.Vector

Description

Geometric functions concerning vectors.

Synopsis

# Documentation

type Vector = Point #

A vector can be treated as a point, and vis-versa.

The magnitude of a vector.

The angle of this vector, relative to the +ve x-axis.

The dot product of two vectors.

The determinant of two vectors.

Multiply a vector by a scalar.

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

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

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

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