mat4x2

Header: cglm/mat4x2.h

Table of contents (click to go):

Macros:

  1. GLM_MAT4X2_ZERO_INIT
  2. GLM_MAT4X2_ZERO

Functions:

  1. glm_mat4x2_copy()
  2. glm_mat4x2_zero()
  3. glm_mat4x2_make()
  4. glm_mat4x2_mul()
  5. glm_mat4x2_mulv()
  6. glm_mat4x2_transpose()
  7. glm_mat4x2_scale()

Functions documentation

void glm_mat4x2_copy(mat4x2 mat, mat4x2 dest)

copy mat4x2 to another one (dest).

Parameters:
[in] mat source
[out] dest destination
void glm_mat4x2_zero(mat4x2 mat)

make given matrix zero

Parameters:
[in,out] mat matrix
void glm_mat4x2_make(float * __restrict src, mat4x2 dest)

Create mat4x2 matrix from pointer

NOTE: @src must contain at least 8 elements.
Parameters:
[in] src pointer to an array of floats
[out] dest destination matrix4x2
void glm_mat4x2_mul(mat4x2 m1, mat2x4 m2, mat4 dest)

multiply m1 and m2 to dest

m1, m2 and dest matrices can be same matrix, it is possible to write this:

glm_mat4x2_mul(m, m, m);
Parameters:
[in] m1 left matrix
[in] m2 right matrix
[out] dest destination matrix
void glm_mat4x2_mulv(mat4x2 m, vec2 v, vec4 dest)

multiply mat4x2 with vec2 (column vector) and store in dest vector

Parameters:
[in] m mat4x2 (left)
[in] v vec2 (right, column vector)
[out] dest destination (result, column vector)
void glm_mat4x2_transpose(mat4x2 m, mat2x4 dest)

transpose matrix and store in dest

Parameters:
[in] m matrix
[out] dest destination
void glm_mat4x2_scale(mat4x2 m, float s)

multiply matrix with scalar

Parameters:
[in, out] m matrix
[in] s scalar