From 0a7cf4514ff1479765bbd285c8191aa0dd703d62 Mon Sep 17 00:00:00 2001 From: cignoni Date: Wed, 31 Mar 2004 10:09:19 +0000 Subject: [PATCH] int64 -> long long for GCC compatibility --- vcg/math/base.h | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/vcg/math/base.h b/vcg/math/base.h index 9edb6ac1..65eac57d 100644 --- a/vcg/math/base.h +++ b/vcg/math/base.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.12 2004/03/16 00:23:50 tarini +- added VoidType - added "static_assert" + Revision 1.11 2004/03/10 17:37:54 tarini Added Atan2. Added common utilities: Max, Min, Swap, Sort(a,b), Sort(a,b,c). @@ -116,13 +119,13 @@ namespace math { const int Value::Min = (-2147483647 - 1); const int Value::Max = +2147483647; const unsigned int Value::Min = 0; - const unsigned int Value::Max = 4294967295; - const __int64 Value<__int64 >::Min = (-9223372036854775807i64 - 1); - const __int64 Value<__int64 >::Max = +9223372036854775807i64; + const unsigned int Value::Max = 4294967295ul; + const long long Value::Min = (-9223372036854775807ll - 1); + const long long Value::Max = +9223372036854775807ll; const long Value::Min = (-2147483647L -1L); const long Value::Max = 2147483647L; const unsigned long Value::Min = 0; - const unsigned long Value::Max = +4294967295; + const unsigned long Value::Max = +4294967295ul; const float Value::Min = -3.4E38F; const float Value::Max = +3.4E38F; const long double Value::Min = -1.2E308; //E4931? @@ -130,19 +133,19 @@ namespace math { const double Value::Min = -1.7E308; const double Value::Max = +1.7E308; - template inline Min(const T &a, const T &b){ + template inline const T & Min(const T &a, const T &b){ if (a inline Max(const T &a, const T &b){ + template inline const T & Max(const T &a, const T &b){ if (a inline Swap(T &a, T &b){ + template inline void Swap(T &a, T &b){ T tmp=a; a=b; b=tmp; }; - template inline Sort(T &a, T &b){ + template inline void Sort(T &a, T &b){ if (a>b) Swap(a,b); }; - template inline Sort(T &a, T &b, T &c){ + template inline void Sort(T &a, T &b, T &c){ if (a>b) Swap(a,b); if (b>c) {Swap(b,c); if (a>b) Swap(a,b);} }; @@ -177,4 +180,4 @@ class VoidType{ public: } // End vcg namespace -#endif \ No newline at end of file +#endif