recp / cglm

📽 Highly Optimized 2D / 3D Graphics Math (glm) for C
MIT License
2.16k stars 227 forks source link

glm_vec3() args #419

Open harryprogramer opened 1 month ago

harryprogramer commented 1 month ago

why function glm_vec3 defined as void glm_vec3(vec4 v4, vec3 dest) where implemenation is dest[0] = v4[0]; dest[1] = v4[1]; dest[2] = v4[2]; takes argument vec4 instead of vec3 or just float*?

bug or something?

recp commented 1 month ago

Hi @harryprogramer,

Thanks for reporting this. glm_vec3() converting vec4 to vec3 this is why it is defined as what it is.

In the future, we may use better name if it is not fit for the purpose.