summaryrefslogtreecommitdiffstats
path: root/3rdparty/bx/src/fpumath.cpp
diff options
context:
space:
mode:
author Branimir Karadžić <branimirkaradzic@gmail.com>2017-03-29 17:09:40 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2017-03-29 17:09:40 +0200
commit49f7c99c7786ce257fae28dfeae2f8ee5810424c (patch)
tree1bbd30dd4dd48596186846c2fc77a8dc748215d2 /3rdparty/bx/src/fpumath.cpp
parent79f22e060b2c012d628d5d1d83288c1bb6e6acef (diff)
Update BGFX and BX (nw)
Diffstat (limited to '3rdparty/bx/src/fpumath.cpp')
-rw-r--r--3rdparty/bx/src/fpumath.cpp70
1 files changed, 68 insertions, 2 deletions
diff --git a/3rdparty/bx/src/fpumath.cpp b/3rdparty/bx/src/fpumath.cpp
index da463e08767..e957ef9e960 100644
--- a/3rdparty/bx/src/fpumath.cpp
+++ b/3rdparty/bx/src/fpumath.cpp
@@ -4,6 +4,7 @@
*/
#include <bx/fpumath.h>
+#include <math.h>
namespace bx
{
@@ -17,7 +18,72 @@ namespace bx
const float huge = HUGE_VALF;
#endif // BX_COMPILER_MSVC
- void mtx3Inverse(float* __restrict _result, const float* __restrict _a)
+ float fabsolute(float _a)
+ {
+ return ::fabsf(_a);
+ }
+
+ float fsin(float _a)
+ {
+ return ::sinf(_a);
+ }
+
+ float fasin(float _a)
+ {
+ return ::asinf(_a);
+ }
+
+ float fcos(float _a)
+ {
+ return ::cosf(_a);
+ }
+
+ float ftan(float _a)
+ {
+ return ::tanf(_a);
+ }
+
+ float facos(float _a)
+ {
+ return ::acosf(_a);
+ }
+
+ float fatan2(float _y, float _x)
+ {
+ return ::atan2f(_y, _x);
+ }
+
+ float fpow(float _a, float _b)
+ {
+ return ::powf(_a, _b);
+ }
+
+ float flog(float _a)
+ {
+ return ::logf(_a);
+ }
+
+ float fsqrt(float _a)
+ {
+ return ::sqrtf(_a);
+ }
+
+ float ffloor(float _f)
+ {
+ return ::floorf(_f);
+ }
+
+ float fceil(float _f)
+ {
+ return ::ceilf(_f);
+ }
+
+ float fmod(float _a, float _b)
+ {
+ return ::fmodf(_a, _b);
+ }
+
+ void mtx3Inverse(float* _result, const float* _a)
{
float xx = _a[0];
float xy = _a[1];
@@ -49,7 +115,7 @@ namespace bx
_result[8] = +(xx*yy - xy*yx) * invDet;
}
- void mtxInverse(float* __restrict _result, const float* __restrict _a)
+ void mtxInverse(float* _result, const float* _a)
{
float xx = _a[ 0];
float xy = _a[ 1];