optimum_pow.hpp 1.2 KB

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