Skip to content

Commit

Permalink
mat4_ins3 should copy mat3s to upper left mat4s. Previously, it just …
Browse files Browse the repository at this point in the history
…made a new mat4s r and put the mat3 into that and returned it. Now it takes in a mat4s and copies the mat3s to that.
  • Loading branch information
telephone001 committed Aug 29, 2023
1 parent 61478d2 commit 54632ec
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions include/cglm/struct/mat4.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
CGLM_INLINE mat4s glms_mat4_zero(void);
CGLM_INLINE mat3s glms_mat4_pick3(mat4s mat);
CGLM_INLINE mat3s glms_mat4_pick3t(mat4s mat);
CGLM_INLINE mat4s glms_mat4_ins3(mat3s mat);
CGLM_INLINE mat4s glms_mat4_ins3(mat3s mat, mat4s dest);
CGLM_INLINE mat4s glms_mat4_mul(mat4s m1, mat4s m2);
CGLM_INLINE mat4s glms_mat4_mulN(mat4s * __restrict matrices[], uint32_t len);
CGLM_INLINE vec4s glms_mat4_mulv(mat4s m, vec4s v);
Expand Down Expand Up @@ -183,14 +183,14 @@ glms_mat4_(pick3t)(mat4s mat) {
* @brief copy mat3 to mat4's upper-left
*
* @param[in] mat source
* @param[in] dest destination
* @returns destination
*/
CGLM_INLINE
mat4s
glms_mat4_(ins3)(mat3s mat) {
mat4s r;
glm_mat4_ins3(mat.raw, r.raw);
return r;
glms_mat4_(ins3)(mat3s mat, mat4s dest) {
glm_mat4_ins3(mat.raw, dest.raw);
return dest;
}

/*!
Expand Down

0 comments on commit 54632ec

Please sign in to comment.