Class: Matrix3

ALMath.Matrix3

new Matrix3()

Class that represent a 3x3 matrix.
Author:
  • Ángel Luis Perales Gómez
Source:

Methods

clone() → {ALMath.Matrix3}

Function clone a matrix.
Source:
Returns:
- A copy of this.
Type
ALMath.Matrix3

determinant() → {number}

Function to compute the matrix determinant.
Source:
Returns:
- The determinant of this.
Type
number

divideByScalar(n) → {ALMath.Matrix3}

Function to divide by scalar n.
Parameters:
Name Type Description
n number Scalar to divide.
Source:
Throws:
Division by zero.
Returns:
- this that is the division between this and scalar n.
Type
ALMath.Matrix3

equals() → {boolean}

Function compare two matrices.
Source:
Returns:
- true if this and v are equals, false otherwise.
Type
boolean

identity()

Function to set this matrix to the identity matrix.
Source:

inverse() → {ALMath.Matrix3}

Function to compute matrix inverse.
Source:
Throws:
Singular matrix. The matrix hasn't inverse.
Returns:
- this that is the invert matrix.
Type
ALMath.Matrix3

multiplyByScalar(n) → {ALMath.Matrix3}

Function to multiply by scalar n.
Parameters:
Name Type Description
n number Scalar to multiply.
Source:
Returns:
- this that is the multiplication between this and scalar n.
Type
ALMath.Matrix3

multiplyByVector(v) → {ALMath.Vector3}

Function to multiply by vector v.
Parameters:
Name Type Description
v ALMath.Vector3 Vector to multiply.
Source:
Returns:
- A new vector which is the multiplication between the matrix this and the vector v.
Type
ALMath.Vector3

set(n11, n12, n13, n21, n22, n23, n31, n32, n33)

Function to set each component. Set the component in row major order.
Parameters:
Name Type Description
n11 number component for row 1 column 1.
n12 number component for row 1 column 2.
n13 number component for row 1 column 3.
n21 number component for row 2 column 1.
n22 number component for row 2 column 2.
n23 number component for row 2 column 3.
n31 number component for row 3 column 1.
n32 number component for row 3 column 2.
n33 number component for row 3 column 3.
Source:

transpose() → {ALMath.Matrix3}

Function to transpose matrix.
Source:
Returns:
- this that is the transpose matrix.
Type
ALMath.Matrix3