Class: Matrix

rat. Matrix

new Matrix(m)

Constructor for Matrix
Parameters:
Name Type Description
m ? Setup with this matrix. Otherwise, ident
Source:

Methods

(static) matMult(m1, m2, destopt) → {Object}

Static method to allow matrix multiplication
Parameters:
Name Type Attributes Description
m1 Object The first matrix
m2 Object The second matrix
dest Object <optional>
destination matrix
Source:
Returns:
dest the multiplied matrix
Type
Object

inverse(Theopt) → {dest}

Get the inverse of one matrix into another matrix
Parameters:
Name Type Attributes Description
The dest <optional>
destination of the matrix inverse
Source:
Returns:
The matrix inverse
Type
dest

inverseSelf() → {bool}

Get the inverse of matrix (in place)
Source:
Returns:
inverted Whether or not the inverse could be taken
Type
bool

loadIdent()

Set this matrix to identity
Source:

multSelf(m2)

Multiply this matrix with another
Parameters:
Name Type Description
m2 Object matrix to multiply with
Source:

rotateSelf(r)

rotate this matrix
Parameters:
Name Type Description
r number
Source:

scaleSelf(x, y)

Scale this matrix
Parameters:
Name Type Description
x number
y number
Source:

set(m)

Set this matrix with an array of arrays
Parameters:
Name Type Description
m ? become this matrix
Source:

transformPoint(popt, destopt) → {Object}

Transform a point by this matrix
Parameters:
Name Type Attributes Description
p Object <optional>
point object
dest Object <optional>
point object
Source:
Returns:
point The transformed point
Type
Object

transformPointSelf(popt)

Transform a point in place by this matrix
Parameters:
Name Type Attributes Description
p Object <optional>
point object
Source:

translateSelf(x, y)

transform this matrix
Parameters:
Name Type Description
x number
y number
Source: