npm install mecks
Minimum Linear Algebra Library
npm install mecks
mecks was built immutable on purpose and relies on the vecks vector library.
While developing make sure you use gulp watch to ease the process of testing your contribution.
*
Members:
+ nullMatrixData
+ identityMatrixData
*
A 2x2 matrix
Construct the matrix using a linearized array
Access an element of the matrix.
Parameters
i: number, row index
j: number, column index
Get all elements of the matrix.
Returns: Array.<number>, linearized data of the matrix
Calculate the determinant of the matrix.
Returns: float
Invert the Matrix.
Returns: Matrix2
Multiply a given vector with this matrix.
Parameters
v: , Multiply a given vector with this matrix.
Returns: Vec2
Add a given righthandside Matrix2 to this Matrix.
Parameters
rhs: , Add a given righthandside Matrix2 to this Matrix.
Returns: Matrix2
Subtract a given righthandside Matrix2 to this Matrix.
Parameters
rhs: , Subtract a given righthandside Matrix2 to this Matrix.
Returns: Matrix2
Multiply the Matrix by a given righthandside Matrix2.
Parameters
rhs: , Multiply the Matrix by a given righthandside Matrix2.
Returns: Matrix2
Add a Scalar value to the Matrix.
Parameters
s: , Add a Scalar value to the Matrix.
Returns: Matrix2
Subtract a Scalar value from the Matrix.
Parameters
s: , Subtract a Scalar value from the Matrix.
Returns: Matrix2
Multiply the Matrix by a Scalar Value.
Parameters
s: , Multiply the Matrix by a Scalar Value.
Returns: Matrix2
Divide the Matrix by a Scalar Value.
Parameters
s: , Divide the Matrix by a Scalar Value.
Returns: Matrix2
Returns a new Identity Matrix.
Returns: Matrix2
Returns a new Null Matrix.
Returns: Matrix2
*
Members:
+ nullMatrixData
+ identityMatrixData
*
A 3x3 matrix
Construct the matrix using a linearized array
Access an element of the matrix.
Parameters
i: number, row index
j: number, column index
Get all elements of the matrix.
Returns: Array.<number>, linearized data of the matrix
Calculate the determinant of the matrix.
Returns: float
Invert the Matrix.
Returns: Matrix3
Add a given righthandside Matrix4 to this Matrix.
Parameters
rhs: , Add a given righthandside Matrix4 to this Matrix.
Returns: Matrix3
Subtract a given righthandside Matrix4 to this Matrix.
Parameters
rhs: , Subtract a given righthandside Matrix4 to this Matrix.
Returns: Matrix3
Multiply the Matrix by a given righthandside Matrix.
Parameters
rhs: , Multiply the Matrix by a given righthandside Matrix.
Returns: Matrix3
Multiply a given vector
Parameters
rhs: , Multiply a given vector
Returns: Vec3
Add a Scalar value to the Matrix.
Parameters
s: , Add a Scalar value to the Matrix.
Returns: Matrix4
Subtract a Scalar value from the Matrix.
Parameters
s: , Subtract a Scalar value from the Matrix.
Returns: Matrix4
Multiply the Matrix by a Scalar Value.
Parameters
s: , Multiply the Matrix by a Scalar Value.
Returns: Matrix4
Divide the Matrix by a Scalar Value.
Parameters
s: , Divide the Matrix by a Scalar Value.
Returns: Matrix4
Returns a new Identity Matrix.
Returns: Matrix3
Returns a new Null Matrix.
Returns: Matrix3
*
Members:
+ nullMatrixData
+ identityMatrixData
*
A 4x4 matrix
Access an element of the matrix.
Parameters
i: number, row index
j: number, column index
Get all elements of the matrix.
Returns: Array.<number>, linearized data of the matrix
Calculate the determinant of the matrix.
Returns: float
Invert the Matrix.
Returns: Matrix2
Multiply a given vector with this matrix.
Parameters
rhs: , Multiply a given vector with this matrix.
Returns: Vec3
Add a given righthandside Matrix4 to this Matrix.
Parameters
rhs: , Add a given righthandside Matrix4 to this Matrix.
Returns: Matrix4
Subtract a given righthandside Matrix4 to this Matrix.
Parameters
rhs: , Subtract a given righthandside Matrix4 to this Matrix.
Returns: Matrix4
Multiply the Matrix by a given righthandside Matrix4.
Parameters
rhs: , Multiply the Matrix by a given righthandside Matrix4.
Returns: Matrix4
Add a Scalar value to the Matrix.
Parameters
s: , Add a Scalar value to the Matrix.
Returns: Matrix4
Subtract a Scalar value from the Matrix.
Parameters
s: , Subtract a Scalar value from the Matrix.
Returns: Matrix4
Multiply the Matrix by a Scalar Value.
Parameters
s: , Multiply the Matrix by a Scalar Value.
Returns: Matrix4
Divide the Matrix by a Scalar Value.
Parameters
s: , Divide the Matrix by a Scalar Value.
Returns: Matrix4
Returns a new Identity Matrix.
Returns: Matrix4
Returns a new Null Matrix.
Returns: Matrix4
*
*
A Plane representation
Project a point onto the plane.
*