API Docs for: 0.5.5
Show:

kick.math.Mat2 Class

Defined in: kick/math/Mat2.js:4
Module: kick.math

Mat2 - 2x2 Matrix Any javascript array containing at least 4 numeric elements can serve as a mat2, however creating matrices using Mat2 constructor functions will use Float32Array

Item Index

Methods

Methods

adjoint

(
  • out
  • a
)
kick.math.Mat2 static

Calculates the adjugate of a mat2

Parameters:

Returns:

clone

(
  • a
)
kick.math.Mat2 static

Creates a new mat2 initialized with values from an existing matrix

Parameters:

Returns:

kick.math.Mat2:

a new 2x2 matrix

copy

(
  • out
  • a
)
kick.math.Mat2 static

Copies the values of one mat3 to another

Parameters:

Returns:

create

() kick.math.Mat2 static

Creates a new instance of a mat2 using Float32Array

Returns:

kick.math.Mat2:

New mat2

determinant

(
  • a
)
Number static

Calculates the determinant of a Mat2

Parameters:

Returns:

Number:

determinant of a

identity

(
  • out
)
kick.math.Mat2 static

Sets a Mat2 to the identity matrix

Parameters:

Returns:

invert

(
  • out
  • a
)
kick.math.Mat2 static

Inverts a Mat2

Parameters:

Returns:

multiply

(
  • out
  • a
  • b
)
kick.math.Mat2 static

Multiplies two Mat2's

Parameters:

Returns:

rotate

(
  • out
  • a
  • rad
)
kick.math.Mat2 static

Rotates a mat2 by the given angle

Parameters:

Returns:

scale

(
  • out
  • a
  • v
)
kick.math.Mat2 static

Scales the mat2 by the dimensions in the given vec2

Parameters:

Returns:

str

(
  • a
)
String static

Returns a string representation of a Mat2

Parameters:

Returns:

String:

string representation of the matrix

strPretty

(
  • mat
)
String static

Returns a string representation of a Mat2 printed as a 2x2 matrix (on 2 lines)

Parameters:

Returns:

String:

string representation of mat

transpose

(
  • out
  • a
)
kick.math.Mat2 static

Transposes a Mat2 (flips the values over the diagonal)

Parameters:

Returns: