|
EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
|
Scalar helpers and numeric limits usable in host and device code. More...
Classes | |
| struct | IntegerLimits |
| Numeric limits of an integer type, from its climits constants. More... | |
| struct | Limits |
| Numeric limits, with the meanings of the std::numeric_limits members of the same names. More... | |
| struct | Limits< double > |
| Numeric limits of double. More... | |
| struct | Limits< float > |
| Numeric limits of float. More... | |
| struct | Limits< int > |
| Numeric limits of int. More... | |
| struct | Limits< long > |
| Numeric limits of long. More... | |
| struct | Limits< long long > |
| Numeric limits of long long. More... | |
| struct | Limits< unsigned int > |
| Numeric limits of unsigned int. More... | |
| struct | Limits< unsigned long > |
| Numeric limits of unsigned long. More... | |
| struct | Limits< unsigned long long > |
| Numeric limits of unsigned long long. More... | |
Functions | |
| template<class T > | |
| constexpr T | min (const T &a_a, const T &a_b) noexcept |
| The smaller of two values. | |
| template<class T > | |
| constexpr T | max (const T &a_a, const T &a_b) noexcept |
| The larger of two values. | |
| template<class T > | |
| constexpr T | clamp (const T &a_value, const T &a_lo, const T &a_hi) noexcept |
| A value limited to [lo, hi]. | |
Scalar helpers and numeric limits usable in host and device code.
|
constexprnoexcept |
A value limited to [lo, hi].
The caller must ensure lo <= hi. A NaN value is returned unchanged, like std::clamp.
| T | Type with operator<. |
| [in] | a_value | Value to limit. |
| [in] | a_lo | Lower bound. |
| [in] | a_hi | Upper bound. |
a_lo if the value is below it, a_hi if it is above it, else the value.
|
constexprnoexcept |
The larger of two values.
Returns a_a when the two compare equal, and when either is NaN returns a_a, like std::max.
| T | Type with operator<. |
| [in] | a_a | First value. |
| [in] | a_b | Second value. |
|
constexprnoexcept |
The smaller of two values.
Returns a_a when the two compare equal, and when either is NaN returns a_a, like std::min.
| T | Type with operator<. |
| [in] | a_a | First value. |
| [in] | a_b | Second value. |