Module geo_nd::vector[][src]

Expand description

Vector functions module

This module provides numerous N-dimensional vector operations operating on [Num; N] (or [Float; N]).

Functions

Add another vector scaled by a value to a vector, returning the sum

Find the axis of rotation of a Matrix3

Clamp each element to be between min and max

Consume the vector and return a new vector that is the original scaled in each coordinate a different scale factor

Return the outer product (cross product) of two 3-dimensional vectors

Return the distance between two vectors

Return the distance square between two vectors

Return the inner product (aka dot product or scalar product) of this and another vector

Format the vector for display

Return true if the vector is all zeros

Return the length of the vector

Return the length^2 of the vector

Find the linear interpolation between two vectors by a parameter t.

Normalize (make unit length) a vector if possible

Reduce ever element of a vector by a single scaling factor

Rotate a vector within a plane around a pivot point by the specified angle

Scale ever element of a vector by a single scaling factor

Set the vector in-place to be zero

Consume the vector, and return a new vector that is the sum of this and a borrowed other vector scaled

Create a zero vector of the correct size