16#ifndef EBGEOMETRY_MATH_HPP
17#define EBGEOMETRY_MATH_HPP
44min(
const T& a_a,
const T& a_b)
noexcept
46 return (a_b < a_a) ? a_b : a_a;
61max(
const T& a_a,
const T& a_b)
noexcept
63 return (a_a < a_b) ? a_b : a_a;
78clamp(
const T& a_value,
const T& a_lo,
const T& a_hi)
noexcept
80 return (a_value < a_lo) ? a_lo : ((a_hi < a_value) ? a_hi : a_value);
104 static constexpr float
115 static constexpr float
126 static constexpr float
137 static constexpr float
148 static constexpr float
166 static constexpr double
177 static constexpr double
188 static constexpr double
199 static constexpr double
210 static constexpr double
223template <
class T, T Lowest, T Max>
GPU portability layer: host/device decoration macros and backend detection.
#define EBGEOMETRY_HOST_DEVICE
Mark a function as callable from both host and device code (no-op on host compilers).
Definition EBGeometry_GPU.hpp:80
constexpr T clamp(const T &a_value, const T &a_lo, const T &a_hi) noexcept
A value limited to [lo, hi].
Definition EBGeometry_Math.hpp:78
constexpr T max(const T &a_a, const T &a_b) noexcept
The larger of two values.
Definition EBGeometry_Math.hpp:61
constexpr T min(const T &a_a, const T &a_b) noexcept
The smaller of two values.
Definition EBGeometry_Math.hpp:44
Namespace containing all of EBGeometry's functionality.
Definition EBGeometry_Affine.hpp:26
Numeric limits of an integer type, from its climits constants.
Definition EBGeometry_Math.hpp:225
static constexpr T min() noexcept
Smallest value (for an integer type, the same as lowest()).
Definition EBGeometry_Math.hpp:254
static constexpr T max() noexcept
Largest value.
Definition EBGeometry_Math.hpp:232
static constexpr T lowest() noexcept
Smallest value.
Definition EBGeometry_Math.hpp:243
static constexpr double infinity() noexcept
Positive infinity.
Definition EBGeometry_Math.hpp:211
static constexpr double epsilon() noexcept
Difference between 1 and the next representable value.
Definition EBGeometry_Math.hpp:200
static constexpr double min() noexcept
Smallest positive normal value.
Definition EBGeometry_Math.hpp:189
static constexpr double lowest() noexcept
Most negative finite value.
Definition EBGeometry_Math.hpp:178
static constexpr double max() noexcept
Largest finite value.
Definition EBGeometry_Math.hpp:167
static constexpr float max() noexcept
Largest finite value.
Definition EBGeometry_Math.hpp:105
static constexpr float min() noexcept
Smallest positive normal value.
Definition EBGeometry_Math.hpp:127
static constexpr float epsilon() noexcept
Difference between 1 and the next representable value.
Definition EBGeometry_Math.hpp:138
static constexpr float lowest() noexcept
Most negative finite value.
Definition EBGeometry_Math.hpp:116
static constexpr float infinity() noexcept
Positive infinity.
Definition EBGeometry_Math.hpp:149
Numeric limits, with the meanings of the std::numeric_limits members of the same names.
Definition EBGeometry_Math.hpp:91