Represents a 2x2 matrix.

Constructors

Properties

elements: number[][]

Methods

  • 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

  • Multiplies this matrix with a vector.

    Parameters

    • v: number[]

    Returns number[]

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

    Parameters

    • a: number[]

    Returns Matrix2x2

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

    Parameters

    • degrees: number

    Returns Matrix2x2

Generated using TypeDoc