0.9.9 API documentation
extended_min_max.hpp
Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "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."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_extented_min_max extension included")
24 #endif
25 
26 namespace glm
27 {
30 
33  template<typename T>
34  GLM_FUNC_DECL T min(
35  T const& x,
36  T const& y,
37  T const& z);
38 
41  template<typename T, template<typename> class C>
42  GLM_FUNC_DECL C<T> min(
43  C<T> const& x,
44  typename C<T>::T const& y,
45  typename C<T>::T const& z);
46 
49  template<typename T, template<typename> class C>
50  GLM_FUNC_DECL C<T> min(
51  C<T> const& x,
52  C<T> const& y,
53  C<T> const& z);
54 
57  template<typename T>
58  GLM_FUNC_DECL T min(
59  T const& x,
60  T const& y,
61  T const& z,
62  T const& w);
63 
66  template<typename T, template<typename> class C>
67  GLM_FUNC_DECL C<T> min(
68  C<T> const& x,
69  typename C<T>::T const& y,
70  typename C<T>::T const& z,
71  typename C<T>::T const& w);
72 
75  template<typename T, template<typename> class C>
76  GLM_FUNC_DECL C<T> min(
77  C<T> const& x,
78  C<T> const& y,
79  C<T> const& z,
80  C<T> const& w);
81 
84  template<typename T>
85  GLM_FUNC_DECL T max(
86  T const& x,
87  T const& y,
88  T const& z);
89 
92  template<typename T, template<typename> class C>
93  GLM_FUNC_DECL C<T> max(
94  C<T> const& x,
95  typename C<T>::T const& y,
96  typename C<T>::T const& z);
97 
100  template<typename T, template<typename> class C>
101  GLM_FUNC_DECL C<T> max(
102  C<T> const& x,
103  C<T> const& y,
104  C<T> const& z);
105 
108  template<typename T>
109  GLM_FUNC_DECL T max(
110  T const& x,
111  T const& y,
112  T const& z,
113  T const& w);
114 
117  template<typename T, template<typename> class C>
118  GLM_FUNC_DECL C<T> max(
119  C<T> const& x,
120  typename C<T>::T const& y,
121  typename C<T>::T const& z,
122  typename C<T>::T const& w);
123 
126  template<typename T, template<typename> class C>
127  GLM_FUNC_DECL C<T> max(
128  C<T> const& x,
129  C<T> const& y,
130  C<T> const& z,
131  C<T> const& w);
132 
138  template<typename genType>
139  GLM_FUNC_DECL genType fmin(genType x, genType y);
140 
147  template<typename genType>
148  GLM_FUNC_DECL genType fmax(genType x, genType y);
149 
155  template<typename genType>
156  GLM_FUNC_DECL genType fclamp(genType x, genType minVal, genType maxVal);
157 
165  template<length_t L, typename T, qualifier Q>
166  GLM_FUNC_DECL vec<L, T, Q> fclamp(vec<L, T, Q> const& x, T minVal, T maxVal);
167 
175  template<length_t L, typename T, qualifier Q>
176  GLM_FUNC_DECL vec<L, T, Q> fclamp(vec<L, T, Q> const& x, vec<L, T, Q> const& minVal, vec<L, T, Q> const& maxVal);
177 
178 
180 }//namespace glm
181 
182 #include "extended_min_max.inl"
GLM_FUNC_DECL genType fmin(genType x, genType y)
Returns y if y < x; otherwise, it returns x.
GLM_FUNC_DECL C< T > min(C< T > const &x, C< T > const &y, C< T > const &z, C< T > const &w)
Return the minimum component-wise values of 4 inputs.
GLM_FUNC_DECL vec< L, T, Q > fclamp(vec< L, T, Q > const &x, vec< L, T, Q > const &minVal, vec< L, T, Q > const &maxVal)
Returns min(max(x, minVal), maxVal) for each component in x.
GLM_FUNC_DECL genType fmax(genType x, genType y)
Returns y if x < y; otherwise, it returns x.
GLM_FUNC_DECL C< T > max(C< T > const &x, C< T > const &y, C< T > const &z, C< T > const &w)
Return the maximum component-wise values of 4 inputs.
Definition: common.hpp:20