Represents a 3x3 matrix.

Constructors

Properties

elements: number[][]

Methods

  • Returns a value in the interval [0, 2]. By adding or subtracting 3 to the input value.

    Parameters

    • i: number

    Returns number

  • Calculates the determinant of the matrix.

    Returns number

  • Returns the element in the given position.

    Parameters

    • y: number

      The y of the element.

    • x: number

      The x of the element

    Returns number

  • Gets the sub matrix excluding a given position. This is used to calculate the adjugate for example. This method always makes the top left element of the new matrix to be the element at the bottom right of the excluded position. If the excluded position is the bottom right of the matrix, the selection wraps and hence chooses the top left of the main matrix to be the top left position of the sub matrix.

    Parameters

    • x: number
    • y: number

    Returns Matrix2x2

  • Multiplies this matrix with an array of numbers.

    Parameters

    • vArray: number[]

    Returns number[]

  • Returns a string representation of this matrix.

    Returns string

  • Returns a 3x3 Matrix from an array. The element in the array are given in the following places: [(0,0), (1,0), (2,0), (0,1), (1,1), (2,1), (0,2), (1,2), (2,2)]

    Parameters

    • a: number[]

    Returns Matrix3x3

  • Returns a rotation matrix with the given degrees. that rotates a vector clockwise.

    Parameters

    • degrees: number

    Returns Matrix3x3

Generated using TypeDoc