header_utils
|
Functions | |
constexpr bool | isnan (std::integral auto f) noexcept |
constexpr bool | isnan (float f) |
constexpr bool | isnan (double f) |
constexpr bool | isfinite (float f) |
constexpr bool | isfinite (double f) |
template<std::floating_point T, typename RESULT = T> | |
constexpr RESULT | floor (T num) noexcept |
Shamelessly stolen from https://gist.github.com/Redchards/7f1b357bf3e686b55362. | |
template<typename T > requires std::is_signed_v<T> | |
constexpr bool | signbit (T num) |
can throw | |
template<typename T > requires (!std::is_signed_v<T>) | |
constexpr bool | signbit (T val) noexcept |
template<typename T > | |
constexpr int | sign (T val) |
template<std::floating_point T, typename RESULT = T> | |
constexpr RESULT | ceil (T num) noexcept |
TODO: sign return num > 0 ? 1 : (num < 0 ? -1 : 0);. | |
template<std::floating_point T, typename RESULT = T> | |
constexpr RESULT | trunc (T num) noexcept |
template<arithmetic T> | |
constexpr auto | abs (T num) |
TODO: round. | |
template<arithmetic T, arithmetic U, arithmetic V> | |
constexpr auto | fma (T a, U b, V c) noexcept |
template<arithmetic T, arithmetic U> | |
constexpr auto | fmod (T a, U b) noexcept |
template<arithmetic T> | |
constexpr auto | sqrt (T value) noexcept |
template<arithmetic T, arithmetic U> | |
constexpr auto | pow (T base, U exponent) noexcept |
template<std::integral T> | |
constexpr unsigned | ilog2 (T val) noexcept |
TODO: sign return num > 0 ? 1 : (num < 0 ? -1 : 0);.
Definition at line 131 of file constexpr_math.h.
Shamelessly stolen from https://gist.github.com/Redchards/7f1b357bf3e686b55362.
Definition at line 63 of file constexpr_math.h.
|
constexprnoexcept |
Definition at line 172 of file constexpr_math.h.
|
constexprnoexcept |
Definition at line 188 of file constexpr_math.h.
|
constexprnoexcept |
Definition at line 254 of file constexpr_math.h.
Definition at line 53 of file constexpr_math.h.
Definition at line 47 of file constexpr_math.h.
Definition at line 41 of file constexpr_math.h.
Definition at line 35 of file constexpr_math.h.
Definition at line 34 of file constexpr_math.h.
|
constexprnoexcept |
Definition at line 231 of file constexpr_math.h.
Definition at line 118 of file constexpr_math.h.
|
constexpr |
can throw
Definition at line 83 of file constexpr_math.h.
|
constexprnoexcept |
Definition at line 112 of file constexpr_math.h.
Definition at line 218 of file constexpr_math.h.