Table of Contents

Class Mat22

Namespace
Vintagestory.API.MathTools
Assembly
VintagestoryAPI.dll

2x2 Matrix

public class Mat22
Inheritance
Mat22
Inherited Members
Extension Methods

Methods

Adjoint(float[], float[])

Calculates the adjugate of a mat2 Returns output

public static float[] Adjoint(float[] output, float[] a)

Parameters

output float[]

the receiving matrix

a float[]

the source matrix

Returns

float[]

CloneIt(float[])

Creates a new mat2 initialized with values from an existing matrix Returns a new 2x2 matrix

public static float[] CloneIt(float[] a)

Parameters

a float[]

matrix to clone

Returns

float[]

Copy(float[], float[])

Copy the values from one mat2 to another Returns output

public static float[] Copy(float[] output, float[] a)

Parameters

output float[]

the receiving matrix

a float[]

the source matrix

Returns

float[]

Create()

Creates a new identity mat2 Returns a new 2x2 matrix

public static float[] Create()

Returns

float[]

Determinant(float[])

Calculates the determinant of a mat2 Returns determinant of a

public static float Determinant(float[] a)

Parameters

a float[]

the source matrix

Returns

float

Identity_(float[])

Set a mat2 to the identity matrix Returns output

public static float[] Identity_(float[] output)

Parameters

output float[]

the receiving matrix

Returns

float[]

Invert(float[], float[])

Inverts a mat2 Returns output

public static float[] Invert(float[] output, float[] a)

Parameters

output float[]

the receiving matrix

a float[]

the source matrix

Returns

float[]

Mul(float[], float[], float[])

Alias for {@link mat2.multiply}

public static float[] Mul(float[] output, float[] a, float[] b)

Parameters

output float[]
a float[]
b float[]

Returns

float[]

Multiply(float[], float[], float[])

Multiplies two mat2's Returns output

public static float[] Multiply(float[] output, float[] a, float[] b)

Parameters

output float[]

the receiving matrix

a float[]

the first operand

b float[]

the second operand

Returns

float[]

Rotate(float[], float[], float)

Rotates a mat2 by the given angle Returns output

public static float[] Rotate(float[] output, float[] a, float rad)

Parameters

output float[]

the receiving matrix

a float[]

the matrix to rotate

rad float

the angle to rotate the matrix by

Returns

float[]

Scale(float[], float[], float[])

Scales the mat2 by the dimensions in the given vec2 Returns output

public static float[] Scale(float[] output, float[] a, float[] v)

Parameters

output float[]

the receiving matrix

a float[]

the matrix to rotate

v float[]

the vec2 to scale the matrix by

Returns

float[]

Transpose(float[], float[])

Transpose the values of a mat2 Returns output

public static float[] Transpose(float[] output, float[] a)

Parameters

output float[]

the receiving matrix

a float[]

the source matrix

Returns

float[]