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