From d0ce78e95b8d37a084aa95290eb8e92a423b31ae Mon Sep 17 00:00:00 2001 From: Amlal Date: Fri, 9 May 2025 13:26:04 +0200 Subject: feat(lib): add math.hpp for STL-inspired utilities. Signed-off-by: Amlal --- lib/astdx/math.hpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 lib/astdx/math.hpp diff --git a/lib/astdx/math.hpp b/lib/astdx/math.hpp new file mode 100644 index 0000000..6d344bd --- /dev/null +++ b/lib/astdx/math.hpp @@ -0,0 +1,35 @@ +/* + * File: equiv.hpp + * Purpose: mathematics c++ header. + * Author: Amlal El Mahrouss (amlal@nekernel.org) + * Copyright 2025, Amlal El Mahrouss all rights reserved. + */ + +#pragma once + +#include + +namespace astdx::math +{ + template + struct is_non_boolean_integer final + { + static constexpr const bool value = true; + }; + + template <> + struct is_non_boolean_integer final + { + static constexpr const bool value = false; + }; + + template <> + struct is_non_boolean_integer final + { + static constexpr const bool value = false; + }; + + constexpr inline auto not_a_number = NAN; + constexpr inline auto positive_infinity = INFINITY; + constexpr inline auto negative_infinity = -positive_infinity; +} // namespace astdx::math \ No newline at end of file -- cgit v1.2.3