Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.8KB

  1. /// @ref gtc_ulp
  2. /// @file glm/gtc/ulp.hpp
  3. ///
  4. /// @see core (dependence)
  5. ///
  6. /// @defgroup gtc_ulp GLM_GTC_ulp
  7. /// @ingroup gtc
  8. ///
  9. /// Include <glm/gtc/ulp.hpp> to use the features of this extension.
  10. ///
  11. /// Allow the measurement of the accuracy of a function against a reference
  12. /// implementation. This extension works on floating-point data and provide results
  13. /// in ULP.
  14. #pragma once
  15. // Dependencies
  16. #include "../detail/setup.hpp"
  17. #include "../detail/qualifier.hpp"
  18. #include "../detail/type_int.hpp"
  19. #include "../detail/compute_vector_relational.hpp"
  20. #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
  21. # pragma message("GLM: GLM_GTC_ulp extension included")
  22. #endif
  23. namespace glm
  24. {
  25. /// @addtogroup gtc_ulp
  26. /// @{
  27. /// Return the next ULP value(s) after the input value(s).
  28. /// @see gtc_ulp
  29. template<typename genType>
  30. GLM_FUNC_DECL genType next_float(genType const& x);
  31. /// Return the previous ULP value(s) before the input value(s).
  32. /// @see gtc_ulp
  33. template<typename genType>
  34. GLM_FUNC_DECL genType prev_float(genType const& x);
  35. /// Return the value(s) ULP distance after the input value(s).
  36. /// @see gtc_ulp
  37. template<typename genType>
  38. GLM_FUNC_DECL genType next_float(genType const& x, uint const& Distance);
  39. /// Return the value(s) ULP distance before the input value(s).
  40. /// @see gtc_ulp
  41. template<typename genType>
  42. GLM_FUNC_DECL genType prev_float(genType const& x, uint const& Distance);
  43. /// Return the distance in the number of ULP between 2 scalars.
  44. /// @see gtc_ulp
  45. template<typename T>
  46. GLM_FUNC_DECL uint float_distance(T const& x, T const& y);
  47. /// Return the distance in the number of ULP between 2 vectors.
  48. /// @see gtc_ulp
  49. template<typename T, qualifier Q>
  50. GLM_FUNC_DECL vec<2, uint, Q> float_distance(vec<2, T, Q> const& x, vec<2, T, Q> const& y);
  51. /// @}
  52. }// namespace glm
  53. #include "ulp.inl"