blob: 428788ecee48a2f3c6c82c13085ffa6447f51697 [file] [log] [blame]
Tony-LunarGb0b195d2015-05-13 15:01:06 -06001///////////////////////////////////////////////////////////////////////////////////
2/// OpenGL Mathematics (glm.g-truc.net)
3///
4/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
5/// Permission is hereby granted, free of charge, to any person obtaining a copy
6/// of this software and associated documentation files (the "Software"), to deal
7/// in the Software without restriction, including without limitation the rights
8/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9/// copies of the Software, and to permit persons to whom the Software is
10/// furnished to do so, subject to the following conditions:
11///
12/// The above copyright notice and this permission notice shall be included in
13/// all copies or substantial portions of the Software.
14///
15/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21/// THE SOFTWARE.
22///
23/// @ref gtc_reciprocal
24/// @file glm/gtc/reciprocal.hpp
25/// @date 2008-10-09 / 2012-01-25
26/// @author Christophe Riccio
27///
28/// @see core (dependence)
29///
30/// @defgroup gtc_reciprocal GLM_GTC_reciprocal
31/// @ingroup gtc
32///
33/// @brief Define secant, cosecant and cotangent functions.
34///
35/// <glm/gtc/reciprocal.hpp> need to be included to use these features.
36///////////////////////////////////////////////////////////////////////////////////
37
38#ifndef GLM_GTC_reciprocal
39#define GLM_GTC_reciprocal
40
41// Dependencies
42#include "../detail/setup.hpp"
43
44#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
45# pragma message("GLM: GLM_GTC_reciprocal extension included")
46#endif
47
48namespace glm
49{
50 /// @addtogroup gtc_reciprocal
51 /// @{
52
53 /// Secant function.
54 /// hypotenuse / adjacent or 1 / cos(x)
55 ///
56 /// @see gtc_reciprocal
57 template <typename genType>
58 GLM_FUNC_DECL genType sec(genType const & angle);
59
60 /// Cosecant function.
61 /// hypotenuse / opposite or 1 / sin(x)
62 ///
63 /// @see gtc_reciprocal
64 template <typename genType>
65 GLM_FUNC_DECL genType csc(genType const & angle);
66
67 /// Cotangent function.
68 /// adjacent / opposite or 1 / tan(x)
69 ///
70 /// @see gtc_reciprocal
71 template <typename genType>
72 GLM_FUNC_DECL genType cot(genType const & angle);
73
74 /// Inverse secant function.
75 ///
76 /// @see gtc_reciprocal
77 template <typename genType>
78 GLM_FUNC_DECL genType asec(genType const & x);
79
80 /// Inverse cosecant function.
81 ///
82 /// @see gtc_reciprocal
83 template <typename genType>
84 GLM_FUNC_DECL genType acsc(genType const & x);
85
86 /// Inverse cotangent function.
87 ///
88 /// @see gtc_reciprocal
89 template <typename genType>
90 GLM_FUNC_DECL genType acot(genType const & x);
91
92 /// Secant hyperbolic function.
93 ///
94 /// @see gtc_reciprocal
95 template <typename genType>
96 GLM_FUNC_DECL genType sech(genType const & angle);
97
98 /// Cosecant hyperbolic function.
99 ///
100 /// @see gtc_reciprocal
101 template <typename genType>
102 GLM_FUNC_DECL genType csch(genType const & angle);
103
104 /// Cotangent hyperbolic function.
105 ///
106 /// @see gtc_reciprocal
107 template <typename genType>
108 GLM_FUNC_DECL genType coth(genType const & angle);
109
110 /// Inverse secant hyperbolic function.
111 ///
112 /// @see gtc_reciprocal
113 template <typename genType>
114 GLM_FUNC_DECL genType asech(genType const & x);
115
116 /// Inverse cosecant hyperbolic function.
117 ///
118 /// @see gtc_reciprocal
119 template <typename genType>
120 GLM_FUNC_DECL genType acsch(genType const & x);
121
122 /// Inverse cotangent hyperbolic function.
123 ///
124 /// @see gtc_reciprocal
125 template <typename genType>
126 GLM_FUNC_DECL genType acoth(genType const & x);
127
128 /// @}
129}//namespace glm
130
131#include "reciprocal.inl"
132
133#endif//GLM_GTC_reciprocal