Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Matrix2

Index

Constructors

constructor

  • new Matrix2(values?: number[]): Matrix2

Properties

Private _values

_values: Float32Array = new Float32Array(4)

mul

mul: multiply = this.multiply

sub

sub: subtract = this.subtract

Accessors

Static identity

identity:

Methods

add

adjoint

  • Calculates the adjugate of a Matrix2

    Parameters

    • Optional dest: Matrix2

      the receiving matrix

    Returns Matrix2

    dest

all

  • all(): number[]

at

  • at(index: number): number
  • Parameters

    • index: number

    Returns number

col

  • col(index: number): number[]
  • Parameters

    • index: number

    Returns number[]

copy

determinant

  • determinant(): number

equals

  • equals(matrix: Matrix2, threshold?: number): boolean
  • Parameters

    • matrix: Matrix2
    • Default value threshold: number = tsmath.EPSILON

    Returns boolean

exactEquals

  • exactEquals(matrix: Matrix2): boolean

frobenius

  • frobenius(): number
  • Returns the Frobenius norm of a Matrix2

    Returns number

    Frobenius norm

init

inverse

multiply

multiplyScalar

rotate

  • Rotates a Matrix2 by the given angle

    Parameters

    • radians: number

      the angle to rotate the matrix by

    • Optional dest: Matrix2

      the receiving matrix

    Returns Matrix2

    dest

row

  • row(index: number): number[]
  • Parameters

    • index: number

    Returns number[]

scale

  • Scales a Matrix2 by the dimensions in the given Vector2

    Parameters

    • v: Vector2

      the Vector2 to scale the matrix by

    • Optional dest: Matrix2

      the receiving matrix

    Returns Matrix2

    dest

setIdentity

subtract

toString

  • toString(): string

transpose

Static fromRotation

  • Creates a Matrix2 from a given angle This is equivalent to (but much faster than): m = Matrix2.identity; m.rotate(radians, m);

    Parameters

    • radians: number

      the angle to rotate the matrix by

    • Optional dest: Matrix2

      the receiving matrix

    Returns Matrix2

    dest

Static fromScaling

  • Creates a matrix from a vector scaling This is equivalent to (but much faster than): m = Matrix2.identity; m.scale(v, m);

    Parameters

    • v: Vector2

      the scaling vector

    • Optional dest: Matrix2

      the receiving matrix

    Returns Matrix2

    dest

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc