gcc porting - successful compilation

This commit is contained in:
h4570
2021-01-12 19:34:30 +01:00
parent 67bbe2e674
commit bc41afdf89
12 changed files with 249 additions and 254 deletions
+5 -5
View File
@@ -14,6 +14,7 @@
#include <tamtypes.h>
#include <math3d.h>
#include "../models/math/vector3.hpp"
#include <fastmath.h>
class Vector3; // Forward definition
@@ -24,16 +25,15 @@ class Math
{
public:
const static float HALF_ANG2RAD = 3.14159265358979323846F / 360.0F;
const static float ANG2RAD = 3.14159265358979323846F / 180.0F;
const static float PI = 3.1415926535897932384626433832795F;
const static float HALF_PI = 1.5707963267948966192313216916398F;
constexpr static float HALF_ANG2RAD = 3.14159265358979323846F / 360.0F;
constexpr static float ANG2RAD = 3.14159265358979323846F / 180.0F;
constexpr static float PI = 3.1415926535897932384626433832795F;
constexpr static float HALF_PI = 1.5707963267948966192313216916398F;
static float cos(float x);
static float asin(float x);
static float mod(float x, float y);
static inline float sin(float x) { return cos(x - HALF_PI); };
static inline float tan(float x) { return sin(x) / cos(x); }
static float sqrt(float x);
static float invSqrt(float x);
static inline u32 max(u32 a, u32 b) { return (a > b) ? a : b; }
static inline s32 max(s32 a, s32 b) { return (a > b) ? a : b; }