diff --git a/include/bx/fpumath.h b/include/bx/fpumath.h index 8d0e756..f05189c 100644 --- a/include/bx/fpumath.h +++ b/include/bx/fpumath.h @@ -235,6 +235,27 @@ namespace bx return len; } + inline void vec3Min(float* __restrict _result, const float* __restrict _a, const float* __restrict _b) + { + _result[0] = fmin(_a[0], _b[0]); + _result[1] = fmin(_a[1], _b[1]); + _result[2] = fmin(_a[2], _b[2]); + } + + inline void vec3Max(float* __restrict _result, const float* __restrict _a, const float* __restrict _b) + { + _result[0] = fmax(_a[0], _b[0]); + _result[1] = fmax(_a[1], _b[1]); + _result[2] = fmax(_a[2], _b[2]); + } + + inline void vec3Rcp(float* __restrict _result, const float* __restrict _a) + { + _result[0] = 1.0f / _a[0]; + _result[1] = 1.0f / _a[1]; + _result[2] = 1.0f / _a[2]; + } + inline void quatIdentity(float* _result) { _result[0] = 0.0f;