Lens Scripting API

    Class mat2

    A 2x2 matrix.

    Index

    Constructors

    • Creates a new mat2, defaulting to identity values.

      Returns mat2

    Properties

    column0: vec2

    The first column of the matrix.

    column1: vec2

    The second column of the matrix.

    description: string

    Returns a string representation of the matrix.

    Methods

    • Returns the result of adding the two matrices together.

      Parameters

      Returns mat2

    • Returns the determinant of the matrix.

      Returns number

    • Returns the result of dividing the two matrices.

      Parameters

      Returns mat2

    • Returns whether the two matrices are equal.

      Parameters

      Returns boolean

    • Returns the identity matrix.

      Returns mat2

    • Returns the inverse of the matrix.

      Returns mat2

    • Returns the result of multiplying the two matrices.

      Parameters

      Returns mat2

    • Returns the result of scalar multiplying the matrix.

      Parameters

      • scalar: number

      Returns mat2

    • Returns the result of subtracting the two matrices.

      Parameters

      Returns mat2

    • Returns a string representation of the matrix.

      Returns string

    • Returns the transpose of this matrix.

      Returns mat2

    • Returns a matrix with all zero values.

      Returns mat2

    MMNEPVFCICPMFPCPTTAAATR