From a78e615c7d01705667032938df231baddab8d554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Fri, 5 Jan 2018 15:02:59 -0800 Subject: [PATCH] Cleanup. --- include/bx/inline/math.inl | 16 ++++++++++++++++ include/bx/math.h | 6 ++++++ 2 files changed, 22 insertions(+) diff --git a/include/bx/inline/math.inl b/include/bx/inline/math.inl index 7e884a0..5b26d67 100644 --- a/include/bx/inline/math.inl +++ b/include/bx/inline/math.inl @@ -718,6 +718,22 @@ namespace bx _result[2] = zz*invW; } + inline void vec4Mul(float* _result, const float* _a, const float* _b) + { + _result[0] = _a[0] * _b[0]; + _result[1] = _a[1] * _b[1]; + _result[2] = _a[2] * _b[2]; + _result[3] = _a[3] * _b[3]; + } + + inline void vec4Mul(float* _result, const float* _a, float _b) + { + _result[0] = _a[0] * _b; + _result[1] = _a[1] * _b; + _result[2] = _a[2] * _b; + _result[3] = _a[3] * _b; + } + inline void vec4MulMtx(float* _result, const float* _vec, const float* _mat) { _result[0] = _vec[0] * _mat[ 0] + _vec[1] * _mat[4] + _vec[2] * _mat[ 8] + _vec[3] * _mat[12]; diff --git a/include/bx/math.h b/include/bx/math.h index cc8c619..1883f38 100644 --- a/include/bx/math.h +++ b/include/bx/math.h @@ -437,6 +437,12 @@ namespace bx /// void vec3MulMtxH(float* _result, const float* _vec, const float* _mat); + /// + void vec4Mul(float* _result, const float* _a, const float* _b); + + /// + void vec4Mul(float* _result, const float* _a, float _b); + /// void vec4MulMtx(float* _result, const float* _vec, const float* _mat);