scalar_constants.hpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /// @ref ext_scalar_constants
  2. /// @file glm/ext/scalar_constants.hpp
  3. ///
  4. /// @defgroup ext_scalar_constants GLM_EXT_scalar_constants
  5. /// @ingroup ext
  6. ///
  7. /// Provides a list of constants and precomputed useful values.
  8. ///
  9. /// Include <glm/ext/scalar_constants.hpp> to use the features of this extension.
  10. #pragma once
  11. // Dependencies
  12. #include "../detail/setup.hpp"
  13. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  14. # pragma message("GLM: GLM_EXT_scalar_constants extension included")
  15. #endif
  16. namespace glm
  17. {
  18. /// @addtogroup ext_scalar_constants
  19. /// @{
  20. /// Return the epsilon constant for floating point types.
  21. template<typename genType>
  22. GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon();
  23. /// Return the pi constant for floating point types.
  24. template<typename genType>
  25. GLM_FUNC_DECL GLM_CONSTEXPR genType pi();
  26. /// Return the value of cos(1 / 2) for floating point types.
  27. template<typename genType>
  28. GLM_FUNC_DECL GLM_CONSTEXPR genType cos_one_over_two();
  29. /// @}
  30. } //namespace glm
  31. #include "scalar_constants.inl"