Class: Maths

b5. Maths

new b5.Maths()

math/maths.js, line 7

The Math class provides basic math utility functionality

Methods

staticb5.Maths.mulMatrix(mat1, mat2)

math/maths.js, line 22

Multiplies two 3x2 matrices, placing the result into mat1 (mat1 = mat1 * mat2)

Name Type Description
mat1 Array.<number>

First matrix

mat2 Array.<number>

First matrix

staticb5.Maths.preMulMatrix(mat1, mat2)

math/maths.js, line 49

Pre-multiplies two 3x2 matrices, placing the result into mat1 (mat1 = mat2 * mat1)

Name Type Description
mat1 Array.<number>

First matrix

mat2 Array.<number>

First matrix

staticb5.Maths.vecMulMatrix(x, y, mat){Object}

math/maths.js, line 78

Multiplies a vector by the supplied 3z2 matrix

Name Type Description
x number

X coordinate

y number

Y coordinate

mat Array.<number>

The matrix to multiple the vector by

Returns:
Type Description
Object The result x,y