Originally created by: cheako
/*!
* @brief reflect vector across a plain identified by it's normal
* and store result in dest
*
* @param[in] I input
* @param[in] N normalized normal
* @param[out] dest reflected vector
*/
CGLM_INLINE
void
glm_vec4_reflect(vec4 I, vec4 N, vec4 dest) {
vec4 mul1;
#ifdef CGLM_BE_MY_MOM
glm_vec4_normalize(N);
#endif
glm_vec4_scale(N, glm_vec4_dot(N, I) * 2.0f, mul1);
glm_vec4_sub(I, mul1, dest);
}
Originally posted by: recp
Would you mind to create a PR for this?
If we want to create call version like
glmc_vec4_reflectthen the macro will be problem here, cglm must be rebuild with this macro.