36 #ifndef GLM_CORE_func_common 37 #define GLM_CORE_func_common GLM_VERSION 52 template <
typename genType>
53 genType
abs(genType
const & x);
61 template <
typename genType>
62 genType
sign(genType
const & x);
70 template <
typename genType>
71 genType
floor(genType
const & x);
80 template <
typename genType>
81 genType
trunc(genType
const & x);
93 template <
typename genType>
94 genType
round(genType
const & x);
105 template <
typename genType>
115 template <
typename genType>
116 genType
ceil(genType
const & x);
124 template <
typename genType>
125 genType
fract(genType
const & x);
134 template <
typename genType>
146 template <
typename genType>
149 typename genType::value_type
const & y);
160 template <
typename genType>
171 template <
typename genType>
176 template <
typename genType>
179 typename genType::value_type
const & y);
187 template <
typename genType>
192 template <
typename genType>
195 typename genType::value_type
const & y);
204 template <
typename genType>
207 genType
const & minVal,
208 genType
const & maxVal);
210 template <
typename genType>
213 typename genType::value_type
const & minVal,
214 typename genType::value_type
const & maxVal);
258 template <
typename genTypeT,
typename genTypeU>
259 genTypeT
mix(genTypeT
const & x, genTypeT
const & y, genTypeU
const & a);
265 template <
typename genType>
267 genType
const & edge,
270 template <
typename genType>
272 typename genType::value_type
const & edge,
289 template <
typename genType>
291 genType
const & edge0,
292 genType
const & edge1,
295 template <
typename genType>
297 typename genType::value_type
const & edge0,
298 typename genType::value_type
const & edge1,
311 template <
typename genType>
312 typename genType::bool_type
isnan(genType
const & x);
324 template <
typename genType>
325 typename genType::bool_type
isinf(genType
const & x);
336 template <
typename genType,
typename genIType>
348 template <
typename genType,
typename genUType>
364 template <
typename genType,
typename genIType>
380 template <
typename genType,
typename genUType>
389 template <
typename genType>
390 genType
fma(genType
const & a, genType
const & b, genType
const & c);
406 template <
typename genType,
typename genIType>
407 genType
frexp(genType
const & x, genIType &
exp);
420 template <
typename genType,
typename genIType>
421 genType
ldexp(genType
const & x, genIType
const &
exp);
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'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