References
summary | ||
public |
C Matrix A class for storing values in rows and columns and for doing common matrix operations. |
|
public |
C Vector Simple extension to js Array to allow function chaining when doing vector operations. |
|
public |
Component-wise addition of two arrays/vectors. |
|
public |
Component-wise addition of a set of arrays/vectors. |
|
public |
Component-wise addition of one vector with a scaled version of another vector. |
|
public |
Find the axis aligned angle of a 3d vector |
|
public |
Find the axis aligned angle of a 2d vector |
|
public |
Clamps the argument according to min and max. |
|
public |
Clamps each value in array according to min and max. |
|
public |
F clampValue(value: number, min: number, max: number): number Clamps the value to min or max if value is less than min or greater than max |
|
public |
Find the cross product between two 3d vectors |
|
public |
Find the psudo cross product between two 2d vectors |
|
public |
Convert radians to degrees |
|
public |
F descr(from: number[], to: number[], target: number[]): {vector: number[], sqr: number, distance: number, unit: number[]} Describes relationships between two points. |
|
public |
Get a unit vector between two points/coordinates. |
|
public |
Calculate the distance between two points/coordinates. |
|
public |
Calculate the dot product between two vectors |
|
public |
Test if a vector is a null vector |
|
public |
Linear interpolation between two numbers |
|
public |
Mix (interpolate) numbers or arrays (similar to glsl implementation). |
|
public |
Normalizes an array/vector |
|
public |
Normalise an angle to be between -PI to +PI |
|
public |
Get a unit vector that is perpendicular to the input vector. |
|
public |
Convert degrees to radians |
|
public |
Rounds a number to the specific number of digits. |
|
public |
Computes the scalar value (length) of a vector |
|
public |
Component-wise scaling of an array or vector |
|
public |
Generates a list of interpolated values between from and to, where the number of elements returned are controlled by the steps argument. |
|
public |
Generates a list of interpolated values between 0 and 1, where the number of elements returned are controlled by the steps argument. |
|
public |
F smoothstep(edge0: number, edge1: number, x: number): * Implementation of glsl smoothstep function |
|
public |
Implementation of glsl step function. |
|
public |
As glsl step function for multiple numeric values |
|
public |
As glsl step function for single numeric values |
|
public |
Component-wise subtraction of two arrays/vectors. |
|
public |
Component-wise subtraction of array/vector and all elements in vectors. |
|
public |
Component-wise addition of one vector with a scaled version of another vector. |
|
public |
Computes the sum of squares |
|
public |
Get the triple product between three 3d vectors |
|
public |
Create a vector from two points. |
|
public |
Factory function for creating and assigning a matrix from an array. |
|
public |
Factory function for creating and assigning a 2x2 matrix. |
|
public |
Factory function for creating and assigning a 3x3 matrix. |
|
public |
Factory function for creating and assigning a 4x4 matrix. |
|
public |
F flattenList(arg: number[], flattend: number[], max: number): * Recursivly flattens a list of arguments to a 1 dimensional array |
|
public |
F rowsToColumns(arr: number[], cols: number, target: number[]): * Transpose a single dimensional array, representing 2d data, from rows first to columns first. |
|
public |
Create a vector of specific dimension and optionally set its values. |
|
public |
Factory function for creating and assigning a 2d vector. |
|
public |
Factory function for creating and assigning a 3d vector. |
|
public |
Factory function for creating and assigning a 4d vector. |
|
public |
V DEG2RAD: * Constant for converting degrees to radians |
|
public |
V EPSILON: * Epsilon |
|
public |
V PI: * PI |
|
public |
V QPI: * Quarter PI |
|
public |
V RAD2DEG: * Constant for converting radians to degrees |
|
public |
V SPI: * Semi PI |
|
public |
V TAU: * Two times PI |