common

Functions for various things such as matrix math
Source:

Methods

(inner) generateRotationMatrix(rotX, rotY, rotZ) → {Array.<array>}

Generate rotation matrix for rotation with given x, y, and z components
Source:
Parameters:
Name Type Description
rotX number x-component of rotation
rotY number y-component of rotation
rotZ number z-component of rotation
Returns:
Type:
Array.<array>
3x3 array (nested array)

(inner) hexToRgb(hex) → (nullable) {object}

Source:
See:
Parameters:
Name Type Description
hex string Hex value to be converted to RGB
Returns:
Type:
object
{r, g, b}

(inner) multiplyMatrices(a, b) → {Array.<array>}

Matrix multiplication
Source:
Parameters:
Name Type Description
a Array.<array> Matrix A
b Array.<array> Matric B
Returns:
Type:
Array.<array>
AxB

(inner) rgbToHex(color) → {string}

Source:
See:
Parameters:
Name Type Description
color object RGB color data
Name Type Description
r number Red value
g number Green value
b number Blue value
Returns:
Type:
string
Hex string (no #)