Interface IMatrix22

Interface for immutable 2x2 matrices. Provides specific operations for 2D transformations.

interface IMatrix22 {
    _v: Float32Array;
    className: string;
    isIdentityMatrixClass: boolean;
    m00: number;
    m01: number;
    m10: number;
    m11: number;
    at(row_i: number, column_i: number): number;
    clone(): IMatrix22;
    determinant(): number;
    flattenAsArray(): number[];
    getScale(): IVector2;
    getScaleTo(outVec: IMutableVector2): IMutableVector2;
    isDummy(): boolean;
    isEqual(mat: IMatrix22, delta?: number): boolean;
    isStrictEqual(mat: IMatrix22): boolean;
    isTheSourceSame(arrayBuffer: ArrayBuffer): boolean;
    multiplyVector(vec: IVector2): IVector2;
    multiplyVectorTo(vec: IVector2, outVec: IMutableVector2): IMutableVector2;
    toString(): string;
    toStringApproximately(): string;
    v(i: number): number;
}

Hierarchy (view full)

Implemented by

Properties

_v: Float32Array

Internal typed array storing matrix data in column-major order

className: string

Returns the class name of the matrix implementation

isIdentityMatrixClass: boolean

Indicates if this matrix is an identity matrix class

m00: number

Element at row 0, column 0

m01: number

Element at row 0, column 1

m10: number

Element at row 1, column 0

m11: number

Element at row 1, column 1

Methods

  • Gets the value at the specified row and column.

    Parameters

    • row_i: number

      Row index (0-based)

    • column_i: number

      Column index (0-based)

    Returns number

    Value at the specified position

  • Checks if this matrix is approximately equal to another matrix.

    Parameters

    • mat: IMatrix22

      Matrix to compare against

    • Optionaldelta: number

      Optional tolerance for comparison (default: small epsilon)

    Returns boolean

    True if matrices are approximately equal

  • Checks if this matrix is strictly equal to another matrix.

    Parameters

    Returns boolean

    True if matrices are exactly equal

  • Checks if the internal array buffer is the same as the provided one.

    Parameters

    • arrayBuffer: ArrayBuffer

      Array buffer to compare against

    Returns boolean

    True if the source is the same

  • Gets the value at the specified linear index.

    Parameters

    • i: number

      Linear index in the internal array

    Returns number

    Value at the specified index