Add lowest to floating point limits
This commit is contained in:
parent
c6e9534b52
commit
ce31ef017f
3
type.hpp
3
type.hpp
@ -212,18 +212,21 @@ template <>
|
|||||||
struct numeric_limits<float> {
|
struct numeric_limits<float> {
|
||||||
static constexpr float min() { return FLT_MIN; }
|
static constexpr float min() { return FLT_MIN; }
|
||||||
static constexpr float max() { return FLT_MAX; }
|
static constexpr float max() { return FLT_MAX; }
|
||||||
|
static constexpr float lowest() { return -FLT_MAX; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct numeric_limits<double> {
|
struct numeric_limits<double> {
|
||||||
static constexpr double min() { return DBL_MIN; }
|
static constexpr double min() { return DBL_MIN; }
|
||||||
static constexpr double max() { return DBL_MAX; }
|
static constexpr double max() { return DBL_MAX; }
|
||||||
|
static constexpr double lowest() { return -DBL_MAX; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct numeric_limits<long double> {
|
struct numeric_limits<long double> {
|
||||||
static constexpr long double min() { return LDBL_MIN; }
|
static constexpr long double min() { return LDBL_MIN; }
|
||||||
static constexpr long double max() { return LDBL_MAX; }
|
static constexpr long double max() { return LDBL_MAX; }
|
||||||
|
static constexpr long double lowest() { return -LDBL_MAX; }
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user