optimum_pow.hpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /// @ref gtx_optimum_pow
  2. /// @file glm/gtx/optimum_pow.hpp
  3. ///
  4. /// @see core (dependence)
  5. ///
  6. /// @defgroup gtx_optimum_pow GLM_GTX_optimum_pow
  7. /// @ingroup gtx
  8. ///
  9. /// Include <glm/gtx/optimum_pow.hpp> to use the features of this extension.
  10. ///
  11. /// Integer exponentiation of power functions.
  12. #pragma once
  13. // Dependency:
  14. #include "../glm.hpp"
  15. #ifndef GLM_ENABLE_EXPERIMENTAL
  16. # error "GLM: GLM_GTX_optimum_pow is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
  17. #endif
  18. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  19. # pragma message("GLM: GLM_GTX_optimum_pow extension included")
  20. #endif
  21. namespace glm{
  22. namespace gtx
  23. {
  24. /// @addtogroup gtx_optimum_pow
  25. /// @{
  26. /// Returns x raised to the power of 2.
  27. ///
  28. /// @see gtx_optimum_pow
  29. template<typename genType>
  30. GLM_FUNC_DECL genType pow2(genType const& x);
  31. /// Returns x raised to the power of 3.
  32. ///
  33. /// @see gtx_optimum_pow
  34. template<typename genType>
  35. GLM_FUNC_DECL genType pow3(genType const& x);
  36. /// Returns x raised to the power of 4.
  37. ///
  38. /// @see gtx_optimum_pow
  39. template<typename genType>
  40. GLM_FUNC_DECL genType pow4(genType const& x);
  41. /// @}
  42. }//namespace gtx
  43. }//namespace glm
  44. #include "optimum_pow.inl"