diff options
Diffstat (limited to 'Client/Source/Phy2DLite/Constants.h')
-rw-r--r-- | Client/Source/Phy2DLite/Constants.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/Client/Source/Phy2DLite/Constants.h b/Client/Source/Phy2DLite/Constants.h index f116ca8..59a8c09 100644 --- a/Client/Source/Phy2DLite/Constants.h +++ b/Client/Source/Phy2DLite/Constants.h @@ -5,7 +5,7 @@ namespace Phy2D
{
#if NUMBER_ALIAS == NUMBER_FPM
-#define CONSTANT(name, value) static fixed name = fixed::from_raw_value(value) +#define CONSTANT(name, value) static constexpr fixed name = fixed::from_raw_value(value) CONSTANT(_1, 65536);
CONSTANT(_n1, -65536);
@@ -16,5 +16,27 @@ namespace Phy2D CONSTANT(_0_95, 62259);
CONSTANT(_12, 786432);
+#elif NUMBER_ALIAS == NUMBER_FLOAT
+
+ static const float _1 = 1;
+ static const float _n1 = -1;
+ static const float _0 = 0;
+ static const float _0_01 = 0.01;
+ static const float _0_2 = 0.2;
+ static const float _0_5 = 0.5;
+ static const float _0_95 = 0.95;
+ static const float _12 = 12;
+
+#elif NUMBER_ALIAS == NUMBER_FIX32
+
+ static const float _1 = 1;
+ static const float _n1 = -1;
+ static const float _0 = 0;
+ static const float _0_01 = 0.01;
+ static const float _0_2 = 0.2;
+ static const float _0_5 = 0.5;
+ static const float _0_95 = 0.95;
+ static const float _12 = 12;
+
#endif
}
\ No newline at end of file |