90 return m.
v[0] * (m.
v[4] * m.
v[8] - m.
v[5] * m.
v[7]) -
91 m.
v[1] * (m.
v[3] * m.
v[8] - m.
v[5] * m.
v[6]) +
92 m.
v[2] * (m.
v[3] * m.
v[7] - m.
v[4] * m.
v[6]);
matrix3 mat3_rotation_y(const vm_float_t degrees)
Builds a 3x3 rotation matrix around the Y axis (degrees).
matrix3 mat3_rotation_x(const vm_float_t degrees)
Builds a 3x3 rotation matrix around the X axis (degrees).
matrix3 mat3_identity(void)
Constructs the 3x3 identity matrix.
matrix3 mat3_rotation_z(const vm_float_t degrees)
Constructs the 3x3 rotation matrix around the Z-axis.
vector3 mat3_mul_vec3(const matrix3 m, const vector3 v)
Multiplies a 3x3 matrix by a vector3.
matrix3 mat3_scale(const vector2 s)
Builds a 3x3 2D scaling matrix.
matrix3 mat3_translate(const vector2 t)
Builds a 3x3 2D translation matrix.
matrix3 mat3_transpose(const matrix3 m)
Computes the transpose of a 3x3 matrix.
vm_float_t mat3_determinant(const matrix3 m)
Computes the determinant of a 3x3 matrix.
matrix3 mat3_mul(const matrix3 a, const matrix3 b)
Multiplies two 3x3 matrices.
matrix3 mat3_from_mat4(const matrix4 m)
Copies the upper-left 3x3 of a matrix4.
matrix3 mat3_inverse(const matrix3 m)
Computes the inverse of a 3x3 matrix.
vector2 mat3_mul_vec2(const matrix3 m, const vector2 v)
Applies a 3x3 affine transform to a vector2.
vm_float_t v[VECMAT_MAT3_SIZE]
void mat3_identity_ptr(matrix3 *res)
Initializes the 3x3 matrix to identity (diagonal 1.0, others 0.0).
void mat3_mul_vec2_ptr(vector2 *res, const matrix3 *m, const vector2 *v)
Applies a 3x3 affine transform to a vector2.
void mat3_translate_ptr(matrix3 *res, const vector2 *t)
Builds a 3x3 2D translation matrix.
void mat3_from_mat4_ptr(matrix3 *res, const matrix4 *m)
Copies the upper-left 3x3 of a matrix4.
void mat3_inverse_ptr(matrix3 *res, const matrix3 *m)
Computes the inverse of the input 3x3 matrix using the adjugate method and stores in res.
void mat3_mul_ptr(matrix3 *res, const matrix3 *a, const matrix3 *b)
Multiplies two 3x3 matrices (a * b) in column-major / column-vector convention.
void mat3_mul_vec3_ptr(vector3 *res, const matrix3 *m, const vector3 *v)
Multiplies a 3x3 matrix by a vector3.
void mat3_scale_ptr(matrix3 *res, const vector2 *s)
Builds a 3x3 2D scaling matrix.
void mat3_transpose_ptr(matrix3 *res, const matrix3 *m)
Computes the transpose of the input 3x3 matrix and stores in res.
void mat3_rotation_x_ptr(matrix3 *res, vm_float_t degrees)
Builds a 3x3 rotation matrix around the X axis (degrees).
void mat3_rotation_z_ptr(matrix3 *res, vm_float_t degrees)
Sets the 3x3 matrix to a rotation around the Z-axis by the given angle in degrees.
void mat3_rotation_y_ptr(matrix3 *res, vm_float_t degrees)
Builds a 3x3 rotation matrix around the Y axis (degrees).