PageRenderTime 23ms CodeModel.GetById 14ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/glm/gtx/extented_min_max.inl

https://bitbucket.org/ggerganov/test_opengl
C++ Header | 178 lines | 157 code | 13 blank | 8 comment | 0 complexity | 8d0b24ec043c39fff2192acaa0570ecb MD5 | raw file
  1///////////////////////////////////////////////////////////////////////////////////////////////////
  2// OpenGL Mathematics Copyright (c) 2005 - 2012 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 
 22	<
 23		typename T, 
 24		template <typename> class C
 25	>
 26	GLM_FUNC_QUALIFIER C<T> min
 27	(
 28		C<T> const & x, 
 29		typename C<T>::value_type const & y, 
 30		typename C<T>::value_type const & z
 31	)
 32	{
 33		return glm::min(glm::min(x, y), z);
 34	}
 35
 36	template 
 37	<
 38		typename T, 
 39		template <typename> class C
 40	>
 41	GLM_FUNC_QUALIFIER C<T> min
 42	(
 43		C<T> const & x, 
 44		C<T> const & y, 
 45		C<T> const & z
 46	)
 47	{
 48		return glm::min(glm::min(x, y), z);
 49	}
 50
 51	template <typename T>
 52	GLM_FUNC_QUALIFIER T min
 53	(
 54		T const & x, 
 55		T const & y, 
 56		T const & z, 
 57		T const & w
 58	)
 59	{
 60		return glm::min(glm::min(x, y), glm::min(z, w));
 61	}
 62
 63	template 
 64	<
 65		typename T, 
 66		template <typename> class C
 67	>
 68	GLM_FUNC_QUALIFIER C<T> min
 69	(
 70		C<T> const & x, 
 71		typename C<T>::value_type const & y, 
 72		typename C<T>::value_type const & z, 
 73		typename C<T>::value_type const & w
 74	)
 75	{
 76		return glm::min(glm::min(x, y), glm::min(z, w));
 77	}
 78
 79	template 
 80	<
 81		typename T, 
 82		template <typename> class C
 83	>
 84	GLM_FUNC_QUALIFIER C<T> min
 85	(
 86		C<T> const & x, 
 87		C<T> const & y, 
 88		C<T> const & z, 
 89		C<T> const & w
 90	)
 91	{
 92		return glm::min(glm::min(x, y), glm::min(z, w));
 93	}
 94
 95	template <typename T>
 96	GLM_FUNC_QUALIFIER T max(
 97		T const & x, 
 98		T const & y, 
 99		T const & z)
100	{
101		return glm::max(glm::max(x, y), z);
102	}
103
104	template 
105	<
106		typename T, 
107		template <typename> class C
108	>
109	GLM_FUNC_QUALIFIER C<T> max
110	(
111		C<T> const & x, 
112		typename C<T>::value_type const & y, 
113		typename C<T>::value_type const & z
114	)
115	{
116		return glm::max(glm::max(x, y), z);
117	}
118
119	template 
120	<
121		typename T, 
122		template <typename> class C
123	>
124	GLM_FUNC_QUALIFIER C<T> max
125	(
126		C<T> const & x, 
127		C<T> const & y, 
128		C<T> const & z
129	)
130	{
131		return glm::max(glm::max(x, y), z);
132	}
133
134	template <typename T>
135	GLM_FUNC_QUALIFIER T max
136	(
137		T const & x, 
138		T const & y, 
139		T const & z, 
140		T const & w
141	)
142	{
143		return glm::max(glm::max(x, y), glm::max(z, w));
144	}
145
146	template 
147	<
148		typename T, 
149		template <typename> class C
150	>
151	GLM_FUNC_QUALIFIER C<T> max
152	(
153		C<T> const & x, 
154		typename C<T>::value_type const & y, 
155		typename C<T>::value_type const & z, 
156		typename C<T>::value_type const & w
157	)
158	{
159		return glm::max(glm::max(x, y), glm::max(z, w));
160	}
161
162	template 
163	<
164		typename T, 
165		template <typename> class C
166	>
167	GLM_FUNC_QUALIFIER C<T> max
168	(
169		C<T> const & x, 
170		C<T> const & y, 
171		C<T> const & z, 
172		C<T> const & w
173	)
174	{
175		return glm::max(glm::max(x, y), glm::max(z, w));
176	}
177
178}//namespace glm