diff options
Diffstat (limited to 'thirdparty/bullet/Bullet3Common/b3MinMax.h')
-rw-r--r-- | thirdparty/bullet/Bullet3Common/b3MinMax.h | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/thirdparty/bullet/Bullet3Common/b3MinMax.h b/thirdparty/bullet/Bullet3Common/b3MinMax.h index 73af23a4f9..c09c3db3f5 100644 --- a/thirdparty/bullet/Bullet3Common/b3MinMax.h +++ b/thirdparty/bullet/Bullet3Common/b3MinMax.h @@ -12,60 +12,58 @@ subject to the following restrictions: 3. This notice may not be removed or altered from any source distribution. */ - - #ifndef B3_GEN_MINMAX_H #define B3_GEN_MINMAX_H #include "b3Scalar.h" template <class T> -B3_FORCE_INLINE const T& b3Min(const T& a, const T& b) +B3_FORCE_INLINE const T& b3Min(const T& a, const T& b) { - return a < b ? a : b ; + return a < b ? a : b; } template <class T> -B3_FORCE_INLINE const T& b3Max(const T& a, const T& b) +B3_FORCE_INLINE const T& b3Max(const T& a, const T& b) { - return a > b ? a : b; + return a > b ? a : b; } template <class T> -B3_FORCE_INLINE const T& b3Clamped(const T& a, const T& lb, const T& ub) +B3_FORCE_INLINE const T& b3Clamped(const T& a, const T& lb, const T& ub) { - return a < lb ? lb : (ub < a ? ub : a); + return a < lb ? lb : (ub < a ? ub : a); } template <class T> -B3_FORCE_INLINE void b3SetMin(T& a, const T& b) +B3_FORCE_INLINE void b3SetMin(T& a, const T& b) { - if (b < a) + if (b < a) { a = b; } } template <class T> -B3_FORCE_INLINE void b3SetMax(T& a, const T& b) +B3_FORCE_INLINE void b3SetMax(T& a, const T& b) { - if (a < b) + if (a < b) { a = b; } } template <class T> -B3_FORCE_INLINE void b3Clamp(T& a, const T& lb, const T& ub) +B3_FORCE_INLINE void b3Clamp(T& a, const T& lb, const T& ub) { - if (a < lb) + if (a < lb) { - a = lb; + a = lb; } - else if (ub < a) + else if (ub < a) { a = ub; } } -#endif //B3_GEN_MINMAX_H +#endif //B3_GEN_MINMAX_H |