diff options
author | Fire_Head <Fire-Head@users.noreply.github.com> | 2019-07-24 20:00:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-24 20:00:08 +0200 |
commit | 81ee1c509a8d05189901dd59c268bf47a6188eb8 (patch) | |
tree | d836f70678f2ce7b5d86a6745f34b45232ff71d0 /src/core/common.h | |
parent | update (diff) | |
parent | Merge branch 'master' into master (diff) | |
download | re3-81ee1c509a8d05189901dd59c268bf47a6188eb8.tar re3-81ee1c509a8d05189901dd59c268bf47a6188eb8.tar.gz re3-81ee1c509a8d05189901dd59c268bf47a6188eb8.tar.bz2 re3-81ee1c509a8d05189901dd59c268bf47a6188eb8.tar.lz re3-81ee1c509a8d05189901dd59c268bf47a6188eb8.tar.xz re3-81ee1c509a8d05189901dd59c268bf47a6188eb8.tar.zst re3-81ee1c509a8d05189901dd59c268bf47a6188eb8.zip |
Diffstat (limited to 'src/core/common.h')
-rw-r--r-- | src/core/common.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/core/common.h b/src/core/common.h index 71c27492..9a5683c6 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -97,11 +97,11 @@ extern void **rwengine; #define SCREEN_SCALE_AR(a) (a) #endif -#include "math/maths.h" -#include "math/Vector.h" -#include "math/Vector2D.h" -#include "math/Matrix.h" -#include "math/Rect.h" +#include "maths.h" +#include "Vector.h" +#include "Vector2D.h" +#include "Matrix.h" +#include "Rect.h" class CRGBA { @@ -139,7 +139,8 @@ inline float sq(float x) { return x*x; } #define SQR(x) ((x) * (x)) #define PI M_PI -#define TWOPI PI*2 +#define TWOPI (PI*2) +#define HALFPI (PI/2) #define DEGTORAD(x) ((x) * PI / 180.0f) #define RADTODEG(x) ((x) * 180.0f / PI) @@ -178,6 +179,7 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con #define max(a, b) (((a) > (b)) ? (a) : (b)) #define min(a, b) (((a) < (b)) ? (a) : (b)) +#define ABS(a) (((a) < 0) ? (-a) : (a)) #define STRINGIFY(x) #x @@ -294,4 +296,4 @@ _TWEEKCLASS(CTweakInt32, int32); _TWEEKCLASS(CTweakUInt32, uint32); _TWEEKCLASS(CTweakFloat, float); -#undef _TWEEKCLASS
\ No newline at end of file +#undef _TWEEKCLASS |