Lugdunum
0.1.0
include
lug
Math
Geometry
Trigonometry.inl
Go to the documentation of this file.
1
template
<
typename
T>
2
inline
T
radians
(T
degrees
) {
3
static_assert(std::numeric_limits<T>::is_iec559,
"'radians' only accept floating-point input"
);
4
return
degrees * T(0.01745329251994329576923690768489);
5
}
6
7
template
<
typename
T>
8
inline
T
degrees
(T
radians
) {
9
static_assert(std::numeric_limits<T>::is_iec559,
"'degrees' only accept floating-point input"
);
10
return
radians * T(57.295779513082320876798154814105);
11
}
12
13
template
<
typename
T>
14
inline
T
sin
(T
radians
) {
15
return ::std::sin
(radians);
16
}
17
18
template
<
typename
T>
19
inline
T
cos
(T
radians
) {
20
return ::std::cos
(radians);
21
}
22
23
template
<
typename
T>
24
inline
T
tan
(T
radians
) {
25
return ::std::tan
(radians);
26
}
27
28
template
<
typename
T>
29
inline
T
asin
(T
radians
) {
30
return ::std::asin
(radians);
31
}
32
33
template
<
typename
T>
34
inline
T
acos
(T
radians
) {
35
return ::std::acos
(radians);
36
}
37
38
template
<
typename
T>
39
inline
T
atan
(T
radians
) {
40
return ::std::atan
(radians);
41
}
42
43
template
<
typename
T>
44
inline
T
atan2
(T y, T x) {
45
return ::std::atan2
(y, x);
46
}
atan
T atan(T radians)
Definition:
Trigonometry.inl:39
sin
T sin(T radians)
Definition:
Trigonometry.inl:14
degrees
T degrees(T radians)
Definition:
Trigonometry.inl:8
radians
T radians(T degrees)
Definition:
Trigonometry.inl:2
cos
T cos(T radians)
Definition:
Trigonometry.inl:19
tan
T tan(T radians)
Definition:
Trigonometry.inl:24
asin
T asin(T radians)
Definition:
Trigonometry.inl:29
atan2
T atan2(T y, T x)
Definition:
Trigonometry.inl:44
acos
T acos(T radians)
Definition:
Trigonometry.inl:34
Generated by
1.8.13