Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #define SMALL_NUMBER (1.e-8f)
- #define KINDA_SMALL_NUMBER (1.e-4f)
- #define BIG_NUMBER (3.4e+38f)
- #define THRESH_VECTOR_NORMALIZED (0.01f)
- namespace Math
- {
- template <typename T>
- static inline T Abs(const T a) { return (a >= (T)0) ? a : -a; }
- //template <typename T>
- //static inline T Max(const T a, const T b) { return (a >= b) ? a : b; }
- //template <typename T>
- //static inline T Min(const T a, const T b) { return (a <= b) ? a : b; }
- template <typename T>
- static inline T Square(const T a) { return a * a; }
- static inline float InvSqrt(float f) { return 1.0f / sqrtf(f); }
- static inline float Sqrtf(const float a) { return sqrtf(a); }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement