reciprocal.hpp 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. /// @ref gtc_reciprocal
  2. /// @file glm/gtc/reciprocal.hpp
  3. ///
  4. /// @see core (dependence)
  5. ///
  6. /// @defgroup gtc_reciprocal GLM_GTC_reciprocal
  7. /// @ingroup gtc
  8. ///
  9. /// Include <glm/gtc/reciprocal.hpp> to use the features of this extension.
  10. ///
  11. /// Define secant, cosecant and cotangent functions.
  12. #pragma once
  13. // Dependencies
  14. #include "../detail/setup.hpp"
  15. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  16. # pragma message("GLM: GLM_GTC_reciprocal extension included")
  17. #endif
  18. namespace glm
  19. {
  20. /// @addtogroup gtc_reciprocal
  21. /// @{
  22. /// Secant function.
  23. /// hypotenuse / adjacent or 1 / cos(x)
  24. ///
  25. /// @tparam genType Floating-point scalar or vector types.
  26. ///
  27. /// @see gtc_reciprocal
  28. template<typename genType>
  29. GLM_FUNC_DECL genType sec(genType angle);
  30. /// Cosecant function.
  31. /// hypotenuse / opposite or 1 / sin(x)
  32. ///
  33. /// @tparam genType Floating-point scalar or vector types.
  34. ///
  35. /// @see gtc_reciprocal
  36. template<typename genType>
  37. GLM_FUNC_DECL genType csc(genType angle);
  38. /// Cotangent function.
  39. /// adjacent / opposite or 1 / tan(x)
  40. ///
  41. /// @tparam genType Floating-point scalar or vector types.
  42. ///
  43. /// @see gtc_reciprocal
  44. template<typename genType>
  45. GLM_FUNC_DECL genType cot(genType angle);
  46. /// Inverse secant function.
  47. ///
  48. /// @return Return an angle expressed in radians.
  49. /// @tparam genType Floating-point scalar or vector types.
  50. ///
  51. /// @see gtc_reciprocal
  52. template<typename genType>
  53. GLM_FUNC_DECL genType asec(genType x);
  54. /// Inverse cosecant function.
  55. ///
  56. /// @return Return an angle expressed in radians.
  57. /// @tparam genType Floating-point scalar or vector types.
  58. ///
  59. /// @see gtc_reciprocal
  60. template<typename genType>
  61. GLM_FUNC_DECL genType acsc(genType x);
  62. /// Inverse cotangent function.
  63. ///
  64. /// @return Return an angle expressed in radians.
  65. /// @tparam genType Floating-point scalar or vector types.
  66. ///
  67. /// @see gtc_reciprocal
  68. template<typename genType>
  69. GLM_FUNC_DECL genType acot(genType x);
  70. /// Secant hyperbolic function.
  71. ///
  72. /// @tparam genType Floating-point scalar or vector types.
  73. ///
  74. /// @see gtc_reciprocal
  75. template<typename genType>
  76. GLM_FUNC_DECL genType sech(genType angle);
  77. /// Cosecant hyperbolic function.
  78. ///
  79. /// @tparam genType Floating-point scalar or vector types.
  80. ///
  81. /// @see gtc_reciprocal
  82. template<typename genType>
  83. GLM_FUNC_DECL genType csch(genType angle);
  84. /// Cotangent hyperbolic function.
  85. ///
  86. /// @tparam genType Floating-point scalar or vector types.
  87. ///
  88. /// @see gtc_reciprocal
  89. template<typename genType>
  90. GLM_FUNC_DECL genType coth(genType angle);
  91. /// Inverse secant hyperbolic function.
  92. ///
  93. /// @return Return an angle expressed in radians.
  94. /// @tparam genType Floating-point scalar or vector types.
  95. ///
  96. /// @see gtc_reciprocal
  97. template<typename genType>
  98. GLM_FUNC_DECL genType asech(genType x);
  99. /// Inverse cosecant hyperbolic function.
  100. ///
  101. /// @return Return an angle expressed in radians.
  102. /// @tparam genType Floating-point scalar or vector types.
  103. ///
  104. /// @see gtc_reciprocal
  105. template<typename genType>
  106. GLM_FUNC_DECL genType acsch(genType x);
  107. /// Inverse cotangent hyperbolic function.
  108. ///
  109. /// @return Return an angle expressed in radians.
  110. /// @tparam genType Floating-point scalar or vector types.
  111. ///
  112. /// @see gtc_reciprocal
  113. template<typename genType>
  114. GLM_FUNC_DECL genType acoth(genType x);
  115. /// @}
  116. }//namespace glm
  117. #include "reciprocal.inl"