diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/astdx/math.hpp | 35 |
1 files changed, 35 insertions, 0 deletions
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 <cmath> + +namespace astdx::math +{ + template <size_t T> + struct is_non_boolean_integer final + { + static constexpr const bool value = true; + }; + + template <> + struct is_non_boolean_integer<false> final + { + static constexpr const bool value = false; + }; + + template <> + struct is_non_boolean_integer<true> 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 |
