Lugdunum  0.1.0
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 }
T atan(T radians)
T sin(T radians)
T degrees(T radians)
Definition: Trigonometry.inl:8
T radians(T degrees)
Definition: Trigonometry.inl:2
T cos(T radians)
T tan(T radians)
T asin(T radians)
T atan2(T y, T x)
T acos(T radians)