You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

133 lines
3.7 KiB

4 years ago
  1. ///////////////////////////////////////////////////////////////////////////////////
  2. /// OpenGL Mathematics (glm.g-truc.net)
  3. ///
  4. /// Copyright (c) 2005 - 2013 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. #ifndef GLM_GTC_reciprocal
  38. #define GLM_GTC_reciprocal GLM_VERSION
  39. // Dependency:
  40. #include "../glm.hpp"
  41. #if(defined(GLM_MESSAGES) && !defined(glm_ext))
  42. # pragma message("GLM: GLM_GTC_reciprocal extension included")
  43. #endif
  44. namespace glm
  45. {
  46. /// @addtogroup gtc_reciprocal
  47. /// @{
  48. /// Secant function.
  49. /// hypotenuse / adjacent or 1 / cos(x)
  50. ///
  51. /// @see gtc_reciprocal
  52. template <typename genType>
  53. genType sec(genType const & angle);
  54. /// Cosecant function.
  55. /// hypotenuse / opposite or 1 / sin(x)
  56. ///
  57. /// @see gtc_reciprocal
  58. template <typename genType>
  59. genType csc(genType const & angle);
  60. /// Cotangent function.
  61. /// adjacent / opposite or 1 / tan(x)
  62. ///
  63. /// @see gtc_reciprocal
  64. template <typename genType>
  65. genType cot(genType const & angle);
  66. /// Inverse secant function.
  67. ///
  68. /// @see gtc_reciprocal
  69. template <typename genType>
  70. genType asec(genType const & x);
  71. /// Inverse cosecant function.
  72. ///
  73. /// @see gtc_reciprocal
  74. template <typename genType>
  75. genType acsc(genType const & x);
  76. /// Inverse cotangent function.
  77. ///
  78. /// @see gtc_reciprocal
  79. template <typename genType>
  80. genType acot(genType const & x);
  81. /// Secant hyperbolic function.
  82. ///
  83. /// @see gtc_reciprocal
  84. template <typename genType>
  85. genType sech(genType const & angle);
  86. /// Cosecant hyperbolic function.
  87. ///
  88. /// @see gtc_reciprocal
  89. template <typename genType>
  90. genType csch(genType const & angle);
  91. /// Cotangent hyperbolic function.
  92. ///
  93. /// @see gtc_reciprocal
  94. template <typename genType>
  95. genType coth(genType const & angle);
  96. /// Inverse secant hyperbolic function.
  97. ///
  98. /// @see gtc_reciprocal
  99. template <typename genType>
  100. genType asech(genType const & x);
  101. /// Inverse cosecant hyperbolic function.
  102. ///
  103. /// @see gtc_reciprocal
  104. template <typename genType>
  105. genType acsch(genType const & x);
  106. /// Inverse cotangent hyperbolic function.
  107. ///
  108. /// @see gtc_reciprocal
  109. template <typename genType>
  110. genType acoth(genType const & x);
  111. /// @}
  112. }//namespace glm
  113. #include "reciprocal.inl"
  114. #endif//GLM_GTC_reciprocal