lnagb.js Documentation

Matrix2

Contains the Matrix2 class, which encodes 2 x 2 matrices in linear algebra.

Author: Zach / cszach@proton.me


Matrix2~Matrix2

Encodes 2 x 2 matrices.

Kind: inner class of Matrix2
See: Matrix for common properties


new Matrix2(a, b, c, d)

All parameters are optional and default to 0.

Param Type Default Description
a number 0 The (1, 1)-entry of the new 2 x 2 matrix
b number 0 The (1, 2)-entry
c number 0 The (2, 1)-entry
d number 0 The (2, 2)-entry

matrix2.interchargeRows() ⇒ Matrix2

Intercharges the two rows in this matrix.

Kind: instance method of Matrix2
Returns: Matrix2 - This matrix


matrix2.multiply(matrix) ⇒ Matrix2

Multiplies this matrix by another 2 x 2 matrix.

Kind: instance method of Matrix2
Returns: Matrix2 - This matrix

Param Type Description
matrix matrix The 2 x 2 matrix to post-multiply this matrix to.