Options
All
  • Public
  • Public/Protected
  • All
Menu

This Class represents a 2x2 Matrix

export

Hierarchy

  • Matrix2

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Matrix2(data: number[][]): Matrix2
  • Creates an instance of Matrix2.

    memberof

    Matrix2

    Parameters

    • data: number[][]

      The initial values for the matrx needs to be 2x2.

    Returns Matrix2

Properties

data

data: number[][]

The data of the Matrix in a twodimensinal array.

memberof

Matrix2

Methods

multiply

  • Multiplies with another matrix to create a new instance.

    If the current matrix is A and the one provided by mat is B then it's AB. Mind the order!

    memberof

    Matrix2

    Parameters

    Returns Matrix2

Static Identity

  • Returns the twodim identity matrix. If row == col => 1 else => 0

    static
    memberof

    Matrix2

    Returns Matrix2

Static Zero

  • Returns an instance filled with zeros.

    static
    memberof

    Matrix2

    Returns Matrix2

Generated using TypeDoc