extended_min_max.hpp 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. /// @ref gtx_extended_min_max
  2. /// @file glm/gtx/extended_min_max.hpp
  3. ///
  4. /// @see core (dependence)
  5. ///
  6. /// @defgroup gtx_extended_min_max GLM_GTX_extented_min_max
  7. /// @ingroup gtx
  8. ///
  9. /// Include <glm/gtx/extented_min_max.hpp> to use the features of this extension.
  10. ///
  11. /// Min and max functions for 3 to 4 parameters.
  12. #pragma once
  13. // Dependency:
  14. #include "../glm.hpp"
  15. #include "../ext/vector_common.hpp"
  16. #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
  17. # ifndef GLM_ENABLE_EXPERIMENTAL
  18. # pragma message("GLM: GLM_GTX_extented_min_max 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.")
  19. # else
  20. # pragma message("GLM: GLM_GTX_extented_min_max extension included")
  21. # endif
  22. #endif
  23. namespace glm
  24. {
  25. /// @addtogroup gtx_extended_min_max
  26. /// @{
  27. /// Return the minimum component-wise values of 3 inputs
  28. /// @see gtx_extented_min_max
  29. template<typename T>
  30. GLM_FUNC_DECL T min(
  31. T const& x,
  32. T const& y,
  33. T const& z);
  34. /// Return the minimum component-wise values of 3 inputs
  35. /// @see gtx_extented_min_max
  36. template<typename T, template<typename> class C>
  37. GLM_FUNC_DECL C<T> min(
  38. C<T> const& x,
  39. typename C<T>::T const& y,
  40. typename C<T>::T const& z);
  41. /// Return the minimum component-wise values of 3 inputs
  42. /// @see gtx_extented_min_max
  43. template<typename T, template<typename> class C>
  44. GLM_FUNC_DECL C<T> min(
  45. C<T> const& x,
  46. C<T> const& y,
  47. C<T> const& z);
  48. /// Return the minimum component-wise values of 4 inputs
  49. /// @see gtx_extented_min_max
  50. template<typename T>
  51. GLM_FUNC_DECL T min(
  52. T const& x,
  53. T const& y,
  54. T const& z,
  55. T const& w);
  56. /// Return the minimum component-wise values of 4 inputs
  57. /// @see gtx_extented_min_max
  58. template<typename T, template<typename> class C>
  59. GLM_FUNC_DECL C<T> min(
  60. C<T> const& x,
  61. typename C<T>::T const& y,
  62. typename C<T>::T const& z,
  63. typename C<T>::T const& w);
  64. /// Return the minimum component-wise values of 4 inputs
  65. /// @see gtx_extented_min_max
  66. template<typename T, template<typename> class C>
  67. GLM_FUNC_DECL C<T> min(
  68. C<T> const& x,
  69. C<T> const& y,
  70. C<T> const& z,
  71. C<T> const& w);
  72. /// Return the maximum component-wise values of 3 inputs
  73. /// @see gtx_extented_min_max
  74. template<typename T>
  75. GLM_FUNC_DECL T max(
  76. T const& x,
  77. T const& y,
  78. T const& z);
  79. /// Return the maximum component-wise values of 3 inputs
  80. /// @see gtx_extented_min_max
  81. template<typename T, template<typename> class C>
  82. GLM_FUNC_DECL C<T> max(
  83. C<T> const& x,
  84. typename C<T>::T const& y,
  85. typename C<T>::T const& z);
  86. /// Return the maximum component-wise values of 3 inputs
  87. /// @see gtx_extented_min_max
  88. template<typename T, template<typename> class C>
  89. GLM_FUNC_DECL C<T> max(
  90. C<T> const& x,
  91. C<T> const& y,
  92. C<T> const& z);
  93. /// Return the maximum component-wise values of 4 inputs
  94. /// @see gtx_extented_min_max
  95. template<typename T>
  96. GLM_FUNC_DECL T max(
  97. T const& x,
  98. T const& y,
  99. T const& z,
  100. T const& w);
  101. /// Return the maximum component-wise values of 4 inputs
  102. /// @see gtx_extented_min_max
  103. template<typename T, template<typename> class C>
  104. GLM_FUNC_DECL C<T> max(
  105. C<T> const& x,
  106. typename C<T>::T const& y,
  107. typename C<T>::T const& z,
  108. typename C<T>::T const& w);
  109. /// Return the maximum component-wise values of 4 inputs
  110. /// @see gtx_extented_min_max
  111. template<typename T, template<typename> class C>
  112. GLM_FUNC_DECL C<T> max(
  113. C<T> const& x,
  114. C<T> const& y,
  115. C<T> const& z,
  116. C<T> const& w);
  117. /// @}
  118. }//namespace glm
  119. #include "extended_min_max.inl"