From ce31ef017f738baaca6f0cbf99dac9d59b5e6811 Mon Sep 17 00:00:00 2001 From: BlackMark Date: Tue, 7 Apr 2020 21:01:48 +0200 Subject: [PATCH] Add lowest to floating point limits --- type.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/type.hpp b/type.hpp index 6397016..eec8028 100644 --- a/type.hpp +++ b/type.hpp @@ -212,18 +212,21 @@ template <> struct numeric_limits { static constexpr float min() { return FLT_MIN; } static constexpr float max() { return FLT_MAX; } + static constexpr float lowest() { return -FLT_MAX; } }; template <> struct numeric_limits { static constexpr double min() { return DBL_MIN; } static constexpr double max() { return DBL_MAX; } + static constexpr double lowest() { return -DBL_MAX; } }; template <> struct numeric_limits { static constexpr long double min() { return LDBL_MIN; } static constexpr long double max() { return LDBL_MAX; } + static constexpr long double lowest() { return -LDBL_MAX; } }; // clang-format on