blob: 57aa392829afeab210a712fc74c22bb5974656a6 (
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
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
124
125
126
127
128
129
130
131
132
133
134
135
|
/// @ref gtc_reciprocal
/// @file glm/gtc/reciprocal.hpp
///
/// @see core (dependence)
///
/// @defgroup gtc_reciprocal GLM_GTC_reciprocal
/// @ingroup gtc
///
/// Include <glm/gtc/reciprocal.hpp> to use the features of this extension.
///
/// Define secant, cosecant and cotangent functions.
#pragma once
// Dependencies
#include "../detail/setup.hpp"
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_GTC_reciprocal extension included")
#endif
namespace glm
{
/// @addtogroup gtc_reciprocal
/// @{
/// Secant function.
/// hypotenuse / adjacent or 1 / cos(x)
///
/// @tparam genType Floating-point scalar or vector types.
///
/// @see gtc_reciprocal
template<typename genType>
GLM_FUNC_DECL genType sec(genType angle);
/// Cosecant function.
/// hypotenuse / opposite or 1 / sin(x)
///
/// @tparam genType Floating-point scalar or vector types.
///
/// @see gtc_reciprocal
template<typename genType>
GLM_FUNC_DECL genType csc(genType angle);
/// Cotangent function.
/// adjacent / opposite or 1 / tan(x)
///
/// @tparam genType Floating-point scalar or vector types.
///
/// @see gtc_reciprocal
template<typename genType>
GLM_FUNC_DECL genType cot(genType angle);
/// Inverse secant function.
///
/// @return Return an angle expressed in radians.
/// @tparam genType Floating-point scalar or vector types.
///
/// @see gtc_reciprocal
template<typename genType>
GLM_FUNC_DECL genType asec(genType x);
/// Inverse cosecant function.
///
/// @return Return an angle expressed in radians.
/// @tparam genType Floating-point scalar or vector types.
///
/// @see gtc_reciprocal
template<typename genType>
GLM_FUNC_DECL genType acsc(genType x);
/// Inverse cotangent function.
///
/// @return Return an angle expressed in radians.
/// @tparam genType Floating-point scalar or vector types.
///
/// @see gtc_reciprocal
template<typename genType>
GLM_FUNC_DECL genType acot(genType x);
/// Secant hyperbolic function.
///
/// @tparam genType Floating-point scalar or vector types.
///
/// @see gtc_reciprocal
template<typename genType>
GLM_FUNC_DECL genType sech(genType angle);
/// Cosecant hyperbolic function.
///
/// @tparam genType Floating-point scalar or vector types.
///
/// @see gtc_reciprocal
template<typename genType>
GLM_FUNC_DECL genType csch(genType angle);
/// Cotangent hyperbolic function.
///
/// @tparam genType Floating-point scalar or vector types.
///
/// @see gtc_reciprocal
template<typename genType>
GLM_FUNC_DECL genType coth(genType angle);
/// Inverse secant hyperbolic function.
///
/// @return Return an angle expressed in radians.
/// @tparam genType Floating-point scalar or vector types.
///
/// @see gtc_reciprocal
template<typename genType>
GLM_FUNC_DECL genType asech(genType x);
/// Inverse cosecant hyperbolic function.
///
/// @return Return an angle expressed in radians.
/// @tparam genType Floating-point scalar or vector types.
///
/// @see gtc_reciprocal
template<typename genType>
GLM_FUNC_DECL genType acsch(genType x);
/// Inverse cotangent hyperbolic function.
///
/// @return Return an angle expressed in radians.
/// @tparam genType Floating-point scalar or vector types.
///
/// @see gtc_reciprocal
template<typename genType>
GLM_FUNC_DECL genType acoth(genType x);
/// @}
}//namespace glm
#include "reciprocal.inl"
|