summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bx/src/fpumath.cpp
diff options
context:
space:
mode:
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];