mat2

mat2

2x2 Matrix

Constructor

# new mat2()

Source:

Methods

# (static) adjoint(out, a) → {mat2}

Source:

Calculates the adjugate of a mat2

Parameters:
Name Type Description
out mat2

the receiving matrix

a mat2

the source matrix

Returns:

out

Type
mat2

# (static) clone(a) → {mat2}

Source:

Creates a new mat2 initialized with values from an existing matrix

Parameters:
Name Type Description
a mat2

matrix to clone

Returns:

a new 2x2 matrix

Type
mat2

# (static) copy(out, a) → {mat2}

Source:

Copy the values from one mat2 to another

Parameters:
Name Type Description
out mat2

the receiving matrix

a mat2

the source matrix

Returns:

out

Type
mat2

# (static) create() → {mat2}

Source:

Creates a new identity mat2

Returns:

a new 2x2 matrix

Type
mat2

# (static) determinant(a) → {Number}

Source:

Calculates the determinant of a mat2

Parameters:
Name Type Description
a mat2

the source matrix

Returns:

determinant of a

Type
Number

# (static) frob(a) → {Number}

Source:

Returns Frobenius norm of a mat2

Parameters:
Name Type Description
a mat2

the matrix to calculate Frobenius norm of

Returns:

Frobenius norm

Type
Number

# (static) identity(out) → {mat2}

Source:

Set a mat2 to the identity matrix

Parameters:
Name Type Description
out mat2

the receiving matrix

Returns:

out

Type
mat2

# (static) invert(out, a) → {mat2}

Source:

Inverts a mat2

Parameters:
Name Type Description
out mat2

the receiving matrix

a mat2

the source matrix

Returns:

out

Type
mat2

# (static) LDU(L, D, U, a)

Source:

Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix

Parameters:
Name Type Description
L mat2

the lower triangular matrix

D mat2

the diagonal matrix

U mat2

the upper triangular matrix

a mat2

the input matrix to factorize

# (static) mul()

Source:

Alias for mat2.multiply

# (static) multiply(out, a, b) → {mat2}

Source:

Multiplies two mat2's

Parameters:
Name Type Description
out mat2

the receiving matrix

a mat2

the first operand

b mat2

the second operand

Returns:

out

Type
mat2

# (static) rotate(out, a, rad) → {mat2}

Source:

Rotates a mat2 by the given angle

Parameters:
Name Type Description
out mat2

the receiving matrix

a mat2

the matrix to rotate

rad Number

the angle to rotate the matrix by

Returns:

out

Type
mat2

# (static) scale(out, a, v) → {mat2}

Source:

Scales the mat2 by the dimensions in the given vec2

Parameters:
Name Type Description
out mat2

the receiving matrix

a mat2

the matrix to rotate

v vec2

the vec2 to scale the matrix by

Returns:

out

Type
mat2

# (static) transpose(out, a) → {mat2}

Source:

Transpose the values of a mat2

Parameters:
Name Type Description
out mat2

the receiving matrix

a mat2

the source matrix

Returns:

out

Type
mat2