Basic math routines.
More...
Go to the source code of this file.
|
| template<typename T > |
| NAMESPACE_SPH_BEGIN constexpr INLINE T | min (const T &f1, const T &f2) |
| | Minimum & Maximum value. More...
|
| |
| template<typename T > |
| constexpr INLINE T | max (const T &f1, const T &f2) |
| |
| template<typename T , typename... TArgs> |
| constexpr INLINE T | min (const T &f1, const T &f2, const TArgs &... rest) |
| |
| template<typename T , typename... TArgs> |
| constexpr INLINE T | max (const T &f1, const T &f2, const TArgs &... rest) |
| |
| template<typename T > |
| constexpr INLINE T | clamp (const T &f, const T &f1, const T &f2) |
| |
| template<typename T > |
| constexpr INLINE bool | isOdd (const T &f) |
| |
Basic math routines.
- Author
- Pavel Sevecek (sevecek at sirrah.troja.mff.cuni.cz)
- Date
- 2016-2021
Definition in file MathBasic.h.
◆ clamp()
template<typename T >
| constexpr INLINE T clamp |
( |
const T & |
f, |
|
|
const T & |
f1, |
|
|
const T & |
f2 |
|
) |
| |
|
constexpr |
◆ isOdd()
template<typename T >
| constexpr INLINE bool isOdd |
( |
const T & |
f | ) |
|
|
constexpr |
◆ max() [1/2]
template<typename T >
| constexpr INLINE T max |
( |
const T & |
f1, |
|
|
const T & |
f2 |
|
) |
| |
|
constexpr |
◆ max() [2/2]
template<typename T , typename... TArgs>
| constexpr INLINE T max |
( |
const T & |
f1, |
|
|
const T & |
f2, |
|
|
const TArgs &... |
rest |
|
) |
| |
|
constexpr |
◆ min() [1/2]
Minimum & Maximum value.
Definition at line 15 of file MathBasic.h.
◆ min() [2/2]
template<typename T , typename... TArgs>
| constexpr INLINE T min |
( |
const T & |
f1, |
|
|
const T & |
f2, |
|
|
const TArgs &... |
rest |
|
) |
| |
|
constexpr |