| 0.9.8

- Main Page
- Modules
- Files

- File List

constants.hpp
Go to the documentation of this file.
1
14 #pragma once
15
16 // Dependencies
17 #include "../detail/setup.hpp"
18
19 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
20 # pragma message("GLM: GLM_GTC_constants extension included")
21 #endif
22
23 namespace glm
24 {
27
30 template <typename genType>
31 GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon();
32
35 template <typename genType>
36 GLM_FUNC_DECL GLM_CONSTEXPR genType zero();
37
40 template <typename genType>
41 GLM_FUNC_DECL GLM_CONSTEXPR genType one();
42
45 template <typename genType>
46 GLM_FUNC_DECL GLM_CONSTEXPR genType pi();
47
50 template <typename genType>
51 GLM_FUNC_DECL GLM_CONSTEXPR genType two_pi();
52
55 template <typename genType>
56 GLM_FUNC_DECL GLM_CONSTEXPR genType root_pi();
57
60 template <typename genType>
61 GLM_FUNC_DECL GLM_CONSTEXPR genType half_pi();
62
65 template <typename genType>
66 GLM_FUNC_DECL GLM_CONSTEXPR genType three_over_two_pi();
67
70 template <typename genType>
71 GLM_FUNC_DECL GLM_CONSTEXPR genType quarter_pi();
72
75 template <typename genType>
76 GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_pi();
77
80 template <typename genType>
81 GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_two_pi();
82
85 template <typename genType>
86 GLM_FUNC_DECL GLM_CONSTEXPR genType two_over_pi();
87
90 template <typename genType>
91 GLM_FUNC_DECL GLM_CONSTEXPR genType four_over_pi();
92
95 template <typename genType>
96 GLM_FUNC_DECL GLM_CONSTEXPR genType two_over_root_pi();
97
100 template <typename genType>
101 GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_root_two();
102
105 template <typename genType>
106 GLM_FUNC_DECL GLM_CONSTEXPR genType root_half_pi();
107
110 template <typename genType>
111 GLM_FUNC_DECL GLM_CONSTEXPR genType root_two_pi();
112
115 template <typename genType>
116 GLM_FUNC_DECL GLM_CONSTEXPR genType root_ln_four();
117
120 template <typename genType>
121 GLM_FUNC_DECL GLM_CONSTEXPR genType e();
122
125 template <typename genType>
126 GLM_FUNC_DECL GLM_CONSTEXPR genType euler();
127
130 template <typename genType>
131 GLM_FUNC_DECL GLM_CONSTEXPR genType root_two();
132
135 template <typename genType>
136 GLM_FUNC_DECL GLM_CONSTEXPR genType root_three();
137
140 template <typename genType>
141 GLM_FUNC_DECL GLM_CONSTEXPR genType root_five();
142
145 template <typename genType>
146 GLM_FUNC_DECL GLM_CONSTEXPR genType ln_two();
147
150 template <typename genType>
151 GLM_FUNC_DECL GLM_CONSTEXPR genType ln_ten();
152
155 template <typename genType>
156 GLM_FUNC_DECL GLM_CONSTEXPR genType ln_ln_two();
157
160 template <typename genType>
161 GLM_FUNC_DECL GLM_CONSTEXPR genType third();
162
165 template <typename genType>
166 GLM_FUNC_DECL GLM_CONSTEXPR genType two_thirds();
167
170 template <typename genType>
171 GLM_FUNC_DECL GLM_CONSTEXPR genType golden_ratio();
172
174 } //namespace glm
175
176 #include "constants.inl"
glm::root_two
GLM_FUNC_DECL GLM_CONSTEXPR genType root_two()
Return sqrt(2).
glm::root_pi
GLM_FUNC_DECL GLM_CONSTEXPR genType root_pi()
Return square root of pi.
glm::zero
GLM_FUNC_DECL GLM_CONSTEXPR genType zero()
Return 0.
glm::one
GLM_FUNC_DECL GLM_CONSTEXPR genType one()
Return 1.
glm::euler
GLM_FUNC_DECL GLM_CONSTEXPR genType euler()
Return Euler's constant.
glm::epsilon
GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon()
Return the epsilon constant for floating point types.
glm::e
GLM_FUNC_DECL GLM_CONSTEXPR genType e()
Return e constant.
glm::two_over_root_pi
GLM_FUNC_DECL GLM_CONSTEXPR genType two_over_root_pi()
Return 2 / sqrt(pi).
glm::root_three
GLM_FUNC_DECL GLM_CONSTEXPR genType root_three()
Return sqrt(3).
glm::ln_ten
GLM_FUNC_DECL GLM_CONSTEXPR genType ln_ten()
Return ln(10).
glm
Definition: _noise.hpp:11
glm::third
GLM_FUNC_DECL GLM_CONSTEXPR genType third()
Return 1 / 3.
glm::ln_two
GLM_FUNC_DECL GLM_CONSTEXPR genType ln_two()
Return ln(2).
glm::one_over_root_two
GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_root_two()
Return 1 / sqrt(2).
glm::ln_ln_two
GLM_FUNC_DECL GLM_CONSTEXPR genType ln_ln_two()
Return ln(ln(2)).
glm::three_over_two_pi
GLM_FUNC_DECL GLM_CONSTEXPR genType three_over_two_pi()
Return pi / 2 * 3.
glm::half_pi
GLM_FUNC_DECL GLM_CONSTEXPR genType half_pi()
Return pi / 2.
glm::one_over_two_pi
GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_two_pi()
Return 1 / (pi * 2).
glm::root_five
GLM_FUNC_DECL GLM_CONSTEXPR genType root_five()
Return sqrt(5).
glm::root_half_pi
GLM_FUNC_DECL GLM_CONSTEXPR genType root_half_pi()
Return sqrt(pi / 2).
glm::root_two_pi
GLM_FUNC_DECL GLM_CONSTEXPR genType root_two_pi()
Return sqrt(2 * pi).
glm::four_over_pi
GLM_FUNC_DECL GLM_CONSTEXPR genType four_over_pi()
Return 4 / pi.
glm::root_ln_four
GLM_FUNC_DECL GLM_CONSTEXPR genType root_ln_four()
Return sqrt(ln(4)).
glm::one_over_pi
GLM_FUNC_DECL GLM_CONSTEXPR genType one_over_pi()
Return 1 / pi.
glm::two_thirds
GLM_FUNC_DECL GLM_CONSTEXPR genType two_thirds()
Return 2 / 3.
glm::quarter_pi
GLM_FUNC_DECL GLM_CONSTEXPR genType quarter_pi()
Return pi / 4.
glm::pi
GLM_FUNC_DECL GLM_CONSTEXPR genType pi()
Return the pi constant.
glm::two_over_pi
GLM_FUNC_DECL GLM_CONSTEXPR genType two_over_pi()
Return 2 / pi.
glm::golden_ratio
GLM_FUNC_DECL GLM_CONSTEXPR genType golden_ratio()
Return the golden ratio constant.
glm::two_pi
GLM_FUNC_DECL GLM_CONSTEXPR genType two_pi()
Return pi * 2.