diff --git a/include/bx/fpumath.h b/include/bx/fpumath.h index f05189c..5a66360 100644 --- a/include/bx/fpumath.h +++ b/include/bx/fpumath.h @@ -173,6 +173,13 @@ namespace bx _result[2] = _a[2] + _b[2]; } + inline void vec3Add(float* __restrict _result, const float* __restrict _a, float _b) + { + _result[0] = _a[0] + _b; + _result[1] = _a[1] + _b; + _result[2] = _a[2] + _b; + } + inline void vec3Sub(float* __restrict _result, const float* __restrict _a, const float* __restrict _b) { _result[0] = _a[0] - _b[0]; @@ -180,6 +187,13 @@ namespace bx _result[2] = _a[2] - _b[2]; } + inline void vec3Sub(float* __restrict _result, const float* __restrict _a, float _b) + { + _result[0] = _a[0] - _b; + _result[1] = _a[1] - _b; + _result[2] = _a[2] - _b; + } + inline void vec3Mul(float* __restrict _result, const float* __restrict _a, const float* __restrict _b) { _result[0] = _a[0] * _b[0];