add simd norm helper

This commit is contained in:
Recep Aslantas
2018-04-13 11:39:14 +03:00
parent 79f8b1ebf8
commit c489955b00

View File

@@ -40,6 +40,12 @@ glm_simd_dot(__m128 a, __m128 b) {
return _mm_add_ps(x0, _mm_shuffle1_ps(x0, 0, 1, 0, 1));
}
CGLM_INLINE
__m128
glm_simd_norm(__m128 a) {
return _mm_sqrt_ps(glm_simd_dot(a, a));
}
#endif
/* x86, x64 */