PSMoveService
func_common.hpp
Go to the documentation of this file.
1 
36 #ifndef GLM_CORE_func_common
37 #define GLM_CORE_func_common GLM_VERSION
38 
39 #include "_fixes.hpp"
40 
41 namespace glm
42 {
45 
52  template <typename genType>
53  genType abs(genType const & x);
54 
61  template <typename genType>
62  genType sign(genType const & x);
63 
70  template <typename genType>
71  genType floor(genType const & x);
72 
80  template <typename genType>
81  genType trunc(genType const & x);
82 
93  template <typename genType>
94  genType round(genType const & x);
95 
105  template <typename genType>
106  genType roundEven(genType const & x);
107 
115  template <typename genType>
116  genType ceil(genType const & x);
117 
124  template <typename genType>
125  genType fract(genType const & x);
126 
134  template <typename genType>
135  genType mod(
136  genType const & x,
137  genType const & y);
138 
146  template <typename genType>
147  genType mod(
148  genType const & x,
149  typename genType::value_type const & y);
150 
160  template <typename genType>
161  genType modf(
162  genType const & x,
163  genType & i);
164 
171  template <typename genType>
172  genType min(
173  genType const & x,
174  genType const & y);
175 
176  template <typename genType>
177  genType min(
178  genType const & x,
179  typename genType::value_type const & y);
180 
187  template <typename genType>
188  genType max(
189  genType const & x,
190  genType const & y);
191 
192  template <typename genType>
193  genType max(
194  genType const & x,
195  typename genType::value_type const & y);
196 
204  template <typename genType>
205  genType clamp(
206  genType const & x,
207  genType const & minVal,
208  genType const & maxVal);
209 
210  template <typename genType>
211  genType clamp(
212  genType const & x,
213  typename genType::value_type const & minVal,
214  typename genType::value_type const & maxVal);
215 
258  template <typename genTypeT, typename genTypeU>
259  genTypeT mix(genTypeT const & x, genTypeT const & y, genTypeU const & a);
260 
265  template <typename genType>
266  genType step(
267  genType const & edge,
268  genType const & x);
269 
270  template <typename genType>
271  genType step(
272  typename genType::value_type const & edge,
273  genType const & x);
274 
289  template <typename genType>
290  genType smoothstep(
291  genType const & edge0,
292  genType const & edge1,
293  genType const & x);
294 
295  template <typename genType>
296  genType smoothstep(
297  typename genType::value_type const & edge0,
298  typename genType::value_type const & edge1,
299  genType const & x);
300 
311  template <typename genType>
312  typename genType::bool_type isnan(genType const & x);
313 
324  template <typename genType>
325  typename genType::bool_type isinf(genType const & x);
326 
336  template <typename genType, typename genIType>
337  genIType floatBitsToInt(genType const & value);
338 
348  template <typename genType, typename genUType>
349  genUType floatBitsToUint(genType const & value);
350 
364  template <typename genType, typename genIType>
365  genType intBitsToFloat(genIType const & value);
366 
380  template <typename genType, typename genUType>
381  genType uintBitsToFloat(genUType const & value);
382 
389  template <typename genType>
390  genType fma(genType const & a, genType const & b, genType const & c);
391 
406  template <typename genType, typename genIType>
407  genType frexp(genType const & x, genIType & exp);
408 
420  template <typename genType, typename genIType>
421  genType ldexp(genType const & x, genIType const & exp);
422 
424 }//namespace glm
425 
426 #include "func_common.inl"
427 
428 #endif//GLM_CORE_func_common
genType ceil(genType const &x)
Returns a value equal to the nearest integer that is greater than or equal to x.
Definition: func_common.inl:186
genType max(genType const &x, genType const &y)
Returns y if x < y; otherwise, it returns x.
Definition: func_common.inl:307
genType roundEven(genType const &x)
Returns a value equal to the nearest integer to x.
Definition: func_common.inl:152
OpenGL Mathematics (glm.g-truc.net)
genType fma(genType const &a, genType const &b, genType const &c)
Computes and returns a * b + c.
Definition: func_common.inl:1098
genType fract(genType const &x)
Return x - floor(x).
Definition: func_common.inl:198
genType::bool_type isnan(genType const &x)
Returns true if x holds a NaN (not a number) representation in the underlying implementation&#39;s set of...
Definition: func_common.inl:807
Definition: _detail.hpp:38
genType exp(genType const &x)
Returns the natural exponentiation of x, i.e., e^x.
Definition: func_exponential.inl:51
genType uintBitsToFloat(genUType const &value)
Returns a floating-point value corresponding to a unsigned integer encoding of a floating-point value...
genType smoothstep(genType const &edge0, genType const &edge1, genType const &x)
Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and performs smooth Hermite interpolation between 0 a...
Definition: func_common.inl:710
genUType floatBitsToUint(genType const &value)
Returns a unsigned integer value representing the encoding of a floating-point value.
genType mod(genType const &x, typename genType::value_type const &y)
Modulus.
genType::bool_type isinf(genType const &x)
Returns true if x holds a positive infinity or negative infinity representation in the underlying imp...
Definition: func_common.inl:861
genType ldexp(genType const &x, genIType const &exp)
Builds a floating-point number from x and the corresponding integral exponent of two in exp...
genIType floatBitsToInt(genType const &value)
Returns a signed integer value representing the encoding of a floating-point value.
genType sign(genType const &x)
Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0.
genType trunc(genType const &x)
Returns a value equal to the nearest integer to x whose absolute value is not larger than the absolut...
Definition: func_common.inl:118
genType modf(genType const &x, genType &i)
Returns the fractional part of x and sets i to the integer part (as a whole number floating point val...
Definition: func_common.inl:228
genType round(genType const &x)
Returns a value equal to the nearest integer to x.
Definition: func_common.inl:128
OpenGL Mathematics (glm.g-truc.net)
genType frexp(genType const &x, genIType &exp)
Splits x into a floating-point significand in the range [0.5, 1.0) and an integral exponent of two...
genType step(genType const &edge, genType const &x)
Returns 0.0 if x < edge, otherwise it returns 1.0.
Definition: func_common.inl:619
genType clamp(genType const &x, genType const &minVal, genType const &maxVal)
Returns min(max(x, minVal), maxVal) for each component in x using the floating-point values minVal an...
genType floor(genType const &x)
Returns a value equal to the nearest integer that is less then or equal to x.
Definition: func_common.inl:107
genType abs(genType const &x)
Returns x if x >= 0; otherwise, it returns -x.
genType intBitsToFloat(genIType const &value)
Returns a floating-point value corresponding to a signed integer encoding of a floating-point value...
genTypeT mix(genTypeT const &x, genTypeT const &y, genTypeU const &a)
Definition: func_common.inl:431