Options
All
  • Public
  • Public/Protected
  • All
Menu

3 by 3 column major matrix

Hierarchy

  • Mat3f

Index

Constructors

constructor

  • Returns Mat3f

Methods

almostEqual

  • almostEqual(other: Mat3f, epsilon: number): boolean
  • Check if the two matrices are equal, within epsilon range.

    Parameters

    • other: Mat3f
    • epsilon: number

    Returns boolean

asList

  • asList(): Float32Array
  • Returns a flat list in column-major order

    Returns Float32Array

at

  • at(col: number, row: number): number
  • Parameters

    • col: number
    • row: number

    Returns number

axis

  • axis(col: number): Vec3f
  • Returns axis 0, 1 or 2. Panics if col is greater than 2.

    Parameters

    • col: number

    Returns Vec3f

det

  • det(): number
  • Calculate the determinant

    Returns number

free

  • free(): void
  • Returns void

inverted

  • inverted(): Mat3f | undefined
  • Returns a new matrix which is the inverse of this.

    If this is not invertible then null is returned.

    Returns Mat3f | undefined

leftProd

  • v*M where M is self

    Parameters

    Returns Vec3f

matMul

  • Calculate A*B=C where A is self

    Parameters

    Returns Mat3f

rightProd

  • M*v where M is self

    Parameters

    Returns Vec3f

set

  • set(col: number, row: number, val: number): void
  • Parameters

    • col: number
    • row: number
    • val: number

    Returns void

swap

  • swap(other: Mat3f): void
  • Swaps the matrices in place

    Parameters

    Returns void

transposed

  • Returns a new matrix that is the transponent of this

    Returns Mat3f

wAxis

  • Returns Vec3f

xAxis

  • Returns Vec3f

yAxis

  • Returns Vec3f

Static identity

  • Returns the identity matrix

    Returns Mat3f

Static rotation

  • rotation(rads: number): Mat3f
  • Returns a 2D rotation matrix, rotatig with rads radians counter-clockwise around the origin

    Parameters

    • rads: number

    Returns Mat3f

Static scale

  • scale(a: number): Mat3f
  • 2D scale transformation matrix.

    Parameters

    • a: number

    Returns Mat3f

Static translate

  • Creates a matrix for the given translation t Where b = M*a equals a+t

    Parameters

    Returns Mat3f

Legend

  • Constructor
  • Property
  • Method
  • Static method

Generated using TypeDoc