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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123 | #pragma once
#include <cstdint><--- Include file: not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <concepts><--- Include file: not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include <utility>
#include <cmath><--- Include file: not found. Please note: Cppcheck does not need standard library headers to get proper results.
#include "snippet/aliases.hpp"
#include "internal/type_traits.hpp"
#include "internal/exception.hpp"
#include "numeric/limits.hpp"
namespace uni {
namespace internal {
template<class T>
consteval auto get_pi() {
if constexpr(std::integral<T>) {
return static_cast<T>(3);
}
else if constexpr(std::same_as<T, float>) {
return M_PIf;
}
else if constexpr(std::same_as<T, double>) {
return M_PI;
}
else if constexpr(std::same_as<T, ld>) {
return M_PIl;
}
else {
static_assert(EXCEPTION_ON_TYPE<T>);
}
}
} // namespace internal
template<class T = ld>
constexpr auto PI = internal::get_pi<T>();
enum class comparison : std::uint8_t {
equal_to,
not_equal_to,
equals = equal_to,
eq = equal_to,
under,
over,
or_under,
or_over,
less = under,
more = over,
less_than = under,
more_than = over,
not_less_than = or_over,
not_more_than = or_under,
leq = or_under,
geq = or_over
};
enum class interval_notation : std::uint8_t {
right_open,
left_open,
open,
closed,
};
enum class replacement_policy : std::uint8_t {
insert_sync,
overwrite_sync,
overwrite_async
};
enum class rotation : std::int8_t {
clockwise,
counter_clockwise,
anti_clockwise = counter_clockwise,
};
enum class positional_relation : std::int8_t {
clockwise,
counter_clockwise,
anti_clockwise = counter_clockwise,
backward,
forward,
in,
on,
out,
included = in,
inscribed,
intersecting,
circumscribed,
distant,
};
enum class alignment : std::int8_t {
left,
center,
right
};
} // namespace uni
|