Core functions and macros.
- Author
- Cem Yuksel
Core functions and macros for math and other common operations
|
|
template<typename T > |
T | Max (T v1, T v2) |
|
template<typename T > |
T | Min (T v1, T v2) |
|
template<typename T > |
T | Max (T v1, T v2, T v3) |
|
template<typename T > |
T | Min (T v1, T v2, T v3) |
|
template<typename T > |
T | Max (T v1, T v2, T v3, T const v4) |
|
template<typename T > |
T | Min (T v1, T v2, T v3, T const v4) |
|
template<typename T > |
T | Clamp (T v, T minVal=T(0), T maxVal=T(1)) |
|
template<typename T > |
T | ACosSafe (T v) |
|
template<typename T > |
T | ASinSafe (T v) |
|
template<typename T > |
T | Sqrt (T v) |
|
template<typename T > |
T | SqrtSafe (T v) |
|
template<typename T > |
T | Pi () |
|
template<typename T > |
bool | IsFinite (T v) |
|
template<typename T > |
void | MemCopy (T *dest, T const *src, size_t count) |
|
template<typename T , typename S > |
void | MemConvert (T *dest, S const *src, size_t count) |
|
template<typename T > |
void | MemClear (T *dest, size_t count) |
|
template<typename T > |
void | SwapBytes (T &v1, T &v2) |
|
template<typename T > |
void | Swap (T &v1, T &v2) |
|
template<bool ascending, typename T > |
void | Sort2 (T &r0, T &r1, T const &v0, T const &v1) |
|
template<bool ascending, typename T > |
void | Sort2 (T r[2], T const v[2]) |
|
template<bool ascending, typename T > |
void | Sort3 (T &r0, T &r1, T &r2, T const &v0, T const &v1, T const &v2) |
|
template<bool ascending, typename T > |
void | Sort3 (T r[3], T const v[3]) |
|
template<bool ascending, typename T > |
void | Sort4 (T &r0, T &r1, T &r2, T &r3, T const &v0, T const &v1, T const &v2, T const &v3) |
|
template<bool ascending, typename T > |
void | Sort4 (T r[4], T const v[4]) |
|