1 /////////////////////////////////////////////////////////////////////////////////// 2 /// OpenGL Mathematics (glm.g-truc.net) 3 /// 4 /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 /// of this software and associated documentation files (the "Software"), to deal 7 /// in the Software without restriction, including without limitation the rights 8 /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 /// copies of the Software, and to permit persons to whom the Software is 10 /// furnished to do so, subject to the following conditions: 11 /// 12 /// The above copyright notice and this permission notice shall be included in 13 /// all copies or substantial portions of the Software. 14 /// 15 /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 /// THE SOFTWARE. 22 /// 23 /// @ref gtx_extented_min_max 24 /// @file glm/gtx/extented_min_max.hpp 25 /// @date 2007-03-14 / 2011-06-07 26 /// @author Christophe Riccio 27 /// 28 /// @see core (dependence) 29 /// @see gtx_half_float (dependence) 30 /// 31 /// @defgroup gtx_extented_min_max GLM_GTX_extented_min_max 32 /// @ingroup gtx 33 /// 34 /// Min and max functions for 3 to 4 parameters. 35 /// 36 /// <glm/gtx/extented_min_max.hpp> need to be included to use these functionalities. 37 /////////////////////////////////////////////////////////////////////////////////// 38 39 #ifndef GLM_GTX_extented_min_max 40 #define GLM_GTX_extented_min_max 41 42 // Dependency: 43 #include "../glm.hpp" 44 45 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 46 # pragma message("GLM: GLM_GTX_extented_min_max extension included") 47 #endif 48 49 namespace glm 50 { 51 /// @addtogroup gtx_extented_min_max 52 /// @{ 53 54 /// Return the minimum component-wise values of 3 inputs 55 /// @see gtx_extented_min_max 56 template <typename T> 57 GLM_FUNC_DECL T min( 58 T const & x, 59 T const & y, 60 T const & z); 61 62 /// Return the minimum component-wise values of 3 inputs 63 /// @see gtx_extented_min_max 64 template <typename T, template <typename> class C> 65 GLM_FUNC_DECL C<T> min( 66 C<T> const & x, 67 typename C<T>::T const & y, 68 typename C<T>::T const & z); 69 70 /// Return the minimum component-wise values of 3 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 78 /// Return the minimum component-wise values of 4 inputs 79 /// @see gtx_extented_min_max 80 template <typename T> 81 GLM_FUNC_DECL T min( 82 T const & x, 83 T const & y, 84 T const & z, 85 T const & w); 86 87 /// Return the minimum component-wise values of 4 inputs 88 /// @see gtx_extented_min_max 89 template <typename T, template <typename> class C> 90 GLM_FUNC_DECL C<T> min( 91 C<T> const & x, 92 typename C<T>::T const & y, 93 typename C<T>::T const & z, 94 typename C<T>::T const & w); 95 96 /// Return the minimum component-wise values of 4 inputs 97 /// @see gtx_extented_min_max 98 template <typename T, template <typename> class C> 99 GLM_FUNC_DECL C<T> min( 100 C<T> const & x, 101 C<T> const & y, 102 C<T> const & z, 103 C<T> const & w); 104 105 /// Return the maximum component-wise values of 3 inputs 106 /// @see gtx_extented_min_max 107 template <typename T> 108 GLM_FUNC_DECL T max( 109 T const & x, 110 T const & y, 111 T const & z); 112 113 /// Return the maximum component-wise values of 3 inputs 114 /// @see gtx_extented_min_max 115 template <typename T, template <typename> class C> 116 GLM_FUNC_DECL C<T> max( 117 C<T> const & x, 118 typename C<T>::T const & y, 119 typename C<T>::T const & z); 120 121 /// Return the maximum component-wise values of 3 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 129 /// Return the maximum component-wise values of 4 inputs 130 /// @see gtx_extented_min_max 131 template <typename T> 132 GLM_FUNC_DECL T max( 133 T const & x, 134 T const & y, 135 T const & z, 136 T const & w); 137 138 /// Return the maximum component-wise values of 4 inputs 139 /// @see gtx_extented_min_max 140 template <typename T, template <typename> class C> 141 GLM_FUNC_DECL C<T> max( 142 C<T> const & x, 143 typename C<T>::T const & y, 144 typename C<T>::T const & z, 145 typename C<T>::T const & w); 146 147 /// Return the maximum component-wise values of 4 inputs 148 /// @see gtx_extented_min_max 149 template <typename T, template <typename> class C> 150 GLM_FUNC_DECL C<T> max( 151 C<T> const & x, 152 C<T> const & y, 153 C<T> const & z, 154 C<T> const & w); 155 156 /// @} 157 }//namespace glm 158 159 #include "extented_min_max.inl" 160 161 #endif//GLM_GTX_extented_min_max 162