summaryrefslogtreecommitdiffhomepage
path: root/dev/lib/logic/math.hpp
blob: 155251b6d0666305423e8d1c757e6b8e00faca33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * File: math.hpp
 * Purpose: Mathematics c++ header.
 * Author: Amlal El Mahrouss (founder@snu.systems)
 * Copyright 2025, Amlal El Mahrouss.
 */

#pragma once

#include <cmath>

namespace snu
{
	template <std::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 snu