9
3

optimum_pow.hpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  16. # ifndef GLM_ENABLE_EXPERIMENTAL
  17. # pragma message("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.")
  18. # else
  19. # pragma message("GLM: GLM_GTX_optimum_pow extension included")
  20. # endif
  21. #endif
  22. namespace glm{
  23. namespace gtx
  24. {
  25. /// @addtogroup gtx_optimum_pow
  26. /// @{
  27. /// Returns x raised to the power of 2.
  28. ///
  29. /// @see gtx_optimum_pow
  30. template<typename genType>
  31. GLM_FUNC_DECL genType pow2(genType const& x);
  32. /// Returns x raised to the power of 3.
  33. ///
  34. /// @see gtx_optimum_pow
  35. template<typename genType>
  36. GLM_FUNC_DECL genType pow3(genType const& x);
  37. /// Returns x raised to the power of 4.
  38. ///
  39. /// @see gtx_optimum_pow
  40. template<typename genType>
  41. GLM_FUNC_DECL genType pow4(genType const& x);
  42. /// @}
  43. }//namespace gtx
  44. }//namespace glm
  45. #include "optimum_pow.inl"