src/matrix3i.c file

Functions

auto mat3i_identity(void) -> matrix3i
Constructs the 3x3 identity matrix.
auto mat3i_mul(const matrix3i a, const matrix3i b) -> matrix3i
Multiplies two 3x3 integer matrices.
auto mat3i_transpose(const matrix3i m) -> matrix3i
Computes the transpose of a 3x3 integer matrix.
auto mat3i_determinant(const matrix3i m) -> vm_int_t
Computes the determinant of a 3x3 integer matrix.
auto mat3i_inverse(const matrix3i m) -> matrix3i
Computes the inverse of a 3x3 integer matrix.
auto mat3i_mul_vec3i(const matrix3i m, const vector3i v) -> vector3i
Multiplies a 3x3 integer matrix by a vector3i.
auto mat3i_mul_vec2i(const matrix3i m, const vector2i v) -> vector2i
Applies a 3x3 integer affine transform to a vector2i.

Function documentation

matrix3i mat3i_identity(void)

Constructs the 3x3 identity matrix.

Returns The identity matrix3i.

matrix3i mat3i_mul(const matrix3i a, const matrix3i b)

Multiplies two 3x3 integer matrices.

Parameters
a The first matrix.
b The second matrix.
Returns The product matrix.

matrix3i mat3i_transpose(const matrix3i m)

Computes the transpose of a 3x3 integer matrix.

Parameters
m The input matrix.
Returns The transposed matrix.

vm_int_t mat3i_determinant(const matrix3i m)

Computes the determinant of a 3x3 integer matrix.

Parameters
m The input matrix.
Returns The determinant value.

matrix3i mat3i_inverse(const matrix3i m)

Computes the inverse of a 3x3 integer matrix.

Parameters
m The input matrix.
Returns The inverse matrix.

vector3i mat3i_mul_vec3i(const matrix3i m, const vector3i v)

Multiplies a 3x3 integer matrix by a vector3i.

Parameters
m Input matrix.
v Input vector.
Returns The resulting vector3i.

vector2i mat3i_mul_vec2i(const matrix3i m, const vector2i v)

Applies a 3x3 integer affine transform to a vector2i.

Parameters
m Input matrix.
v Input vector.
Returns The resulting vector2i.