mirror of
https://github.com/recp/cglm.git
synced 2025-12-26 10:35:10 +00:00
translate and scale make util
This commit is contained in:
@@ -121,6 +121,13 @@ glm_translate_z(mat4 m, float to) {
|
||||
#endif
|
||||
}
|
||||
|
||||
CGLM_INLINE
|
||||
void
|
||||
glm_translate_make(mat4 m, vec3 v) {
|
||||
mat4 t = GLM_MAT4_IDENTITY_INIT;
|
||||
glm_translate_to(t, v, m);
|
||||
}
|
||||
|
||||
/* scale */
|
||||
|
||||
CGLM_INLINE
|
||||
@@ -133,6 +140,13 @@ glm_scale_to(mat4 m, vec3 v, mat4 dest) {
|
||||
glm_vec4_copy(m[3], dest[3]);
|
||||
}
|
||||
|
||||
CGLM_INLINE
|
||||
void
|
||||
glm_scale_make(mat4 m, vec3 v) {
|
||||
mat4 t = GLM_MAT4_IDENTITY_INIT;
|
||||
glm_scale_to(t, v, m);
|
||||
}
|
||||
|
||||
CGLM_INLINE
|
||||
void
|
||||
glm_scale(mat4 m, vec3 v) {
|
||||
|
||||
Reference in New Issue
Block a user