kick.math.Mat2 Class
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
adjoint
-
out
-
a
Calculates the adjugate of a mat2
Parameters:
-
out
kick.math.Mat2the receiving matrix
-
a
kick.math.Mat2the source matrix
Returns:
out
clone
-
a
Creates a new mat2 initialized with values from an existing matrix
Parameters:
-
a
kick.math.Mat2matrix to clone
Returns:
a new 2x2 matrix
copy
-
out
-
a
Copies the values of one mat3 to another
Parameters:
-
out
kick.math.Mat2the receiving matrix
-
a
kick.math.Mat2the source matrix
Returns:
out
create
()
kick.math.Mat2
static
Creates a new instance of a mat2 using Float32Array
Returns:
New mat2
determinant
-
a
Calculates the determinant of a Mat2
Parameters:
-
a
kick.math.Mat2the source matrix
Returns:
determinant of a
identity
-
out
Sets a Mat2 to the identity matrix
Parameters:
-
out
kick.math.Mat2the receiving matrix
Returns:
out
invert
-
out
-
a
Inverts a Mat2
Parameters:
-
out
kick.math.Mat2the receiving matrix
-
a
kick.math.Mat2the source matrix
Returns:
out
multiply
-
out
-
a
-
b
Multiplies two Mat2's
Parameters:
-
out
kick.math.Mat2the receiving matrix
-
a
kick.math.Mat2the first operand
-
b
kick.math.Mat2the second operand
Returns:
out
rotate
-
out
-
a
-
rad
Rotates a mat2 by the given angle
Parameters:
-
out
kick.math.Mat2the receiving matrix
-
a
kick.math.Mat2the matrix to rotate
-
rad
Numberthe angle to rotate the matrix by
Returns:
out
scale
-
out
-
a
-
v
Scales the mat2 by the dimensions in the given vec2
Parameters:
-
out
kick.math.Mat2the receiving matrix
-
a
kick.math.Mat2the matrix to rotate
-
v
kick.math.Vec2the vec2 to scale the matrix by
Returns:
out
str
-
a
Returns a string representation of a Mat2
Parameters:
-
a
kick.math.Mat2matrix to represent as a string
Returns:
string representation of the matrix
strPretty
-
mat
Returns a string representation of a Mat2 printed as a 2x2 matrix (on 2 lines)
Parameters:
-
mat
kick.math.Mat2mat2 to represent as a string
Returns:
string representation of mat
transpose
-
out
-
a
Transposes a Mat2 (flips the values over the diagonal)
Parameters:
-
out
kick.math.Mat2the receiving matrix
-
a
kick.math.Mat2the source matrix
Returns:
out