wima
    Preparing search index...

    Class Matrix2

    Represents a 2x2 matrix.

    Matrix layout: | a | c | | b | d |

    Index

    Constructors

    • Creates a matrix from raw components.

      Parameters

      • Optionale11: number
      • Optionale12: number
      • Optionale21: number
      • Optionale22: number

      Returns Matrix2

    Properties

    a: number
    b: number
    c: number
    d: number
    Identity: Matrix2

    The identity matrix.

    Zero: Matrix2

    The zero matrix.

    Methods

    • Iterates over the matrix components in column-major order.

      Returns IterableIterator<number>

    • Adds another matrix to this one.

      Parameters

      Returns Matrix2

    • Adds a scalar to each element.

      Parameters

      • scalar: number

      Returns Matrix2

    • Creates a new matrix with the same components.

      Returns Matrix2

    • Copies another matrix into this one.

      Parameters

      Returns this

    • Returns the determinant of this matrix.

      Returns number

    • Divides this matrix by another (this = this * inverse(matrix)).

      Parameters

      Returns Matrix2

    • Divides each element by a scalar.

      Parameters

      • scalar: number

      Returns Matrix2

    • Checks component-wise equality.

      Parameters

      Returns boolean

    • Inverts this matrix in place.

      Returns Matrix2

    • Multiplies this matrix by another.

      Parameters

      Returns Matrix2

    • Multiplies each element by a scalar.

      Parameters

      • scalar: number

      Returns Matrix2

    • Serializes this matrix.

      Returns Matrix2Like

    • Sets this matrix from raw components.

      Parameters

      • e11: number
      • e12: number
      • e21: number
      • e22: number

      Returns this

    • Subtracts another matrix from this one.

      Parameters

      Returns Matrix2

    • Subtracts a scalar from each element.

      Parameters

      • scalar: number

      Returns Matrix2

    • Returns the trace of this matrix.

      Returns number

    • Transposes this matrix in place.

      Returns Matrix2

    • Adds a scalar to each element.

      Parameters

      Returns Matrix2

    • Computes the determinant of a matrix.

      Parameters

      Returns number

    • Divides a matrix by a scalar.

      Parameters

      Returns Matrix2

    • Checks component-wise equality for two matrices.

      Parameters

      Returns boolean

    • Writes the identity matrix.

      Parameters

      Returns Matrix2

    • Multiplies a matrix by a scalar.

      Parameters

      Returns Matrix2

    • Creates or overwrites a matrix from raw components.

      Parameters

      • e11: number
      • e12: number
      • e21: number
      • e22: number
      • Optionalout: Matrix2

      Returns Matrix2

    • Subtracts a scalar from each element.

      Parameters

      Returns Matrix2

    • Computes the trace of a matrix.

      Parameters

      Returns number

    • Checks whether a value is a valid matrix serial.

      Parameters

      • value: unknown

      Returns value is Matrix2Like

    • Writes the zero matrix.

      Parameters

      Returns Matrix2