blob: af9b2888f69ba1d9753a020f8cc799148922aea3 (
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
|
///////////////////////////////////////////////////////////////////////////////////////////////////
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
///////////////////////////////////////////////////////////////////////////////////////////////////
// Created : 2008-10-09
// Updated : 2008-10-09
// Licence : This source is under MIT License
// File : glm/gtx/reciprocal.hpp
///////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef glm_gtx_reciprocal
#define glm_gtx_reciprocal
// Dependency:
#include "../glm.hpp"
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
# pragma message("GLM: GLM_GTX_reciprocal extension included")
#endif
namespace glm{
namespace gtx{
namespace reciprocal ///< GLM_GTX_reciprocal extension: Define secant, cosecant and cotangent functions.
{
/// \addtogroup gtx_reciprocal
/// @{
//! Secant function.
//! hypotenuse / adjacent or 1 / cos(x)
//! From GLM_GTX_reciprocal extension.
template <typename genType>
genType sec(genType const & angle);
//! Cosecant function.
//! hypotenuse / opposite or 1 / sin(x)
//! From GLM_GTX_reciprocal extension.
template <typename genType>
genType csc(genType const & angle);
//! Cotangent function.
//! adjacent / opposite or 1 / tan(x)
//! From GLM_GTX_reciprocal extension.
template <typename genType>
genType cot(genType const & angle);
//! Inverse secant function.
//! From GLM_GTX_reciprocal extension.
template <typename genType>
genType asec(genType const & x);
//! Inverse cosecant function.
//! From GLM_GTX_reciprocal extension.
template <typename genType>
genType acsc(genType const & x);
//! Inverse cotangent function.
//! From GLM_GTX_reciprocal extension.
template <typename genType>
genType acot(genType const & x);
//! Secant hyperbolic function.
//! From GLM_GTX_reciprocal extension.
template <typename genType>
genType sech(genType const & angle);
//! Cosecant hyperbolic function.
//! From GLM_GTX_reciprocal extension.
template <typename genType>
genType csch(genType const & angle);
//! Cotangent hyperbolic function.
//! From GLM_GTX_reciprocal extension.
template <typename genType>
genType coth(genType const & angle);
//! Inverse secant hyperbolic function.
//! From GLM_GTX_reciprocal extension.
template <typename genType>
genType asech(genType const & x);
//! Inverse cosecant hyperbolic function.
//! From GLM_GTX_reciprocal extension.
template <typename genType>
genType acsch(genType const & x);
//! Inverse cotangent hyperbolic function.
//! From GLM_GTX_reciprocal extension.
template <typename genType>
genType acoth(genType const & x);
/// @}
}//namespace reciprocal
}//namespace gtx
}//namespace glm
#include "reciprocal.inl"
namespace glm{using namespace gtx::reciprocal;}
#endif//glm_gtx_reciprocal
|