1/////////////////////////////////////////////////////////////////////////////////////////////////// 2// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3/////////////////////////////////////////////////////////////////////////////////////////////////// 4// Created : 2007-03-14 5// Updated : 2010-02-19 6// Licence : This source is under MIT License 7// File : gtx_extented_min_max.inl 8/////////////////////////////////////////////////////////////////////////////////////////////////// 9 10namespace glm 11{ 12 template <typename T> 13 GLM_FUNC_QUALIFIER T min( 14 T const & x, 15 T const & y, 16 T const & z) 17 { 18 return glm::min(glm::min(x, y), z); 19 } 20 21 template <typename T, template <typename> class C> 22 GLM_FUNC_QUALIFIER C<T> min 23 ( 24 C<T> const & x, 25 typename C<T>::T const & y, 26 typename C<T>::T const & z 27 ) 28 { 29 return glm::min(glm::min(x, y), z); 30 } 31 32 template <typename T, template <typename> class C> 33 GLM_FUNC_QUALIFIER C<T> min 34 ( 35 C<T> const & x, 36 C<T> const & y, 37 C<T> const & z 38 ) 39 { 40 return glm::min(glm::min(x, y), z); 41 } 42 43 template <typename T> 44 GLM_FUNC_QUALIFIER T min 45 ( 46 T const & x, 47 T const & y, 48 T const & z, 49 T const & w 50 ) 51 { 52 return glm::min(glm::min(x, y), glm::min(z, w)); 53 } 54 55 template <typename T, template <typename> class C> 56 GLM_FUNC_QUALIFIER C<T> min 57 ( 58 C<T> const & x, 59 typename C<T>::T const & y, 60 typename C<T>::T const & z, 61 typename C<T>::T const & w 62 ) 63 { 64 return glm::min(glm::min(x, y), glm::min(z, w)); 65 } 66 67 template <typename T, template <typename> class C> 68 GLM_FUNC_QUALIFIER C<T> min 69 ( 70 C<T> const & x, 71 C<T> const & y, 72 C<T> const & z, 73 C<T> const & w 74 ) 75 { 76 return glm::min(glm::min(x, y), glm::min(z, w)); 77 } 78 79 template <typename T> 80 GLM_FUNC_QUALIFIER T max( 81 T const & x, 82 T const & y, 83 T const & z) 84 { 85 return glm::max(glm::max(x, y), z); 86 } 87 88 template <typename T, template <typename> class C> 89 GLM_FUNC_QUALIFIER C<T> max 90 ( 91 C<T> const & x, 92 typename C<T>::T const & y, 93 typename C<T>::T const & z 94 ) 95 { 96 return glm::max(glm::max(x, y), z); 97 } 98 99 template <typename T, template <typename> class C> 100 GLM_FUNC_QUALIFIER C<T> max 101 ( 102 C<T> const & x, 103 C<T> const & y, 104 C<T> const & z 105 ) 106 { 107 return glm::max(glm::max(x, y), z); 108 } 109 110 template <typename T> 111 GLM_FUNC_QUALIFIER T max 112 ( 113 T const & x, 114 T const & y, 115 T const & z, 116 T const & w 117 ) 118 { 119 return glm::max(glm::max(x, y), glm::max(z, w)); 120 } 121 122 template <typename T, template <typename> class C> 123 GLM_FUNC_QUALIFIER C<T> max 124 ( 125 C<T> const & x, 126 typename C<T>::T const & y, 127 typename C<T>::T const & z, 128 typename C<T>::T const & w 129 ) 130 { 131 return glm::max(glm::max(x, y), glm::max(z, w)); 132 } 133 134 template <typename T, template <typename> class C> 135 GLM_FUNC_QUALIFIER C<T> max 136 ( 137 C<T> const & x, 138 C<T> const & y, 139 C<T> const & z, 140 C<T> const & w 141 ) 142 { 143 return glm::max(glm::max(x, y), glm::max(z, w)); 144 } 145 146}//namespace glm 147