Functions

Functions

GLM Core

The functions defined by the specification. More...

Functions

template<typename genFIType >
genFIType abs (genFIType const &x)
template<typename genType >
genType acos (genType const &x)
template<typename genType >
genType acosh (genType const &x)
template<template< typename > class vecType>
bool all (vecType< bool > const &v)
template<template< typename > class vecType>
bool any (vecType< bool > const &v)
template<typename genType >
genType asin (genType const &x)
template<typename genType >
genType asinh (genType const &x)
template<typename genType >
genType atan (genType const &y, genType const &x)
template<typename genType >
genType atan (genType const &y_over_x)
template<typename genType >
genType atanh (genType const &x)
template<typename T , template< typename > class C>
C< T >::signed_type bitCount (C< T > const &Value)
template<typename genIUType >
genIUType bitfieldExtract (genIUType const &Value, int const &Offset, int const &Bits)
template<typename genIUType >
genIUType bitfieldInsert (genIUType const &Base, genIUType const &Insert, int const &Offset, int const &Bits)
template<typename genIUType >
genIUType bitfieldReverse (genIUType const &value)
template<typename genType >
genType ceil (genType const &x)
template<typename genType >
genType clamp (genType const &x, genType const &minVal, genType const &maxVal)
template<typename genType >
genType cos (genType const &angle)
template<typename genType >
genType cosh (genType const &angle)
template<typename T >
detail::tvec3< T > cross (detail::tvec3< T > const &x, detail::tvec3< T > const &y)
template<typename genType >
genType degrees (genType const &radians)
template<typename T >
detail::tmat2x2< T >::value_type determinant (detail::tmat2x2< T > const &m)
template<typename T >
detail::tmat3x3< T >::value_type determinant (detail::tmat3x3< T > const &m)
template<typename T >
detail::tmat4x4< T >::value_type determinant (detail::tmat4x4< T > const &m)
template<typename genType >
genType::value_type distance (genType const &p0, genType const &p1)
template<typename genType >
genType::value_type dot (genType const &x, genType const &y)
template<typename T , template< typename > class vecType>
vecType< T >::bool_type equal (vecType< T > const &x, vecType< T > const &y)
template<typename genType >
genType exp (genType const &x)
template<typename genType >
genType exp2 (genType const &x)
template<typename genType >
genType faceforward (genType const &N, genType const &I, genType const &Nref)
template<typename T , template< typename > class C>
C< T >::signed_type findLSB (C< T > const &Value)
template<typename T , template< typename > class C>
C< T >::signed_type findMSB (C< T > const &Value)
template<typename genType , typename genIType >
genIType floatBitsToInt (genType const &value)
template<typename genType >
genType floor (genType const &x)
template<typename genType >
genType fma (genType const &a, genType const &b, genType const &c)
template<typename genType >
genType fract (genType const &x)
template<typename genType , typename genIType >
genType frexp (genType const &x, genIType &exp)
template<typename T , template< typename > class vecType>
vecType< T >::bool_type greaterThan (vecType< T > const &x, vecType< T > const &y)
template<typename T , template< typename > class vecType>
vecType< T >::bool_type greaterThanEqual (vecType< T > const &x, vecType< T > const &y)
template<typename genIType >
void imulExtended (genIType const &x, genIType const &y, genIType &msb, genIType &lsb)
template<typename genType , typename genIUType >
genType intBitsToFloat (genIUType const &value)
template<typename T >
detail::tmat2x2< T > inverse (detail::tmat2x2< T > const &m)
template<typename T >
detail::tmat3x3< T > inverse (detail::tmat3x3< T > const &m)
template<typename T >
detail::tmat4x4< T > inverse (detail::tmat4x4< T > const &m)
template<typename genType >
genType inversesqrt (genType const &x)
template<typename genType >
genType::bool_type isinf (genType const &x)
template<typename genType >
genType::bool_type isnan (genType const &x)
template<typename genType , typename genIType >
genType ldexp (genType const &x, genIType const &exp)
template<typename genType >
genType::value_type length (genType const &x)
template<typename T , template< typename > class vecType>
vecType< T >::bool_type lessThan (vecType< T > const &x, vecType< T > const &y)
template<typename T , template< typename > class vecType>
vecType< T >::bool_type lessThanEqual (vecType< T > const &x, vecType< T > const &y)
template<typename genType >
genType log (genType const &x)
template<typename genType >
genType log2 (genType const &x)
template<typename matType >
matType matrixCompMult (matType const &x, matType const &y)
template<typename genType >
genType max (genType const &x, genType const &y)
template<typename genType >
genType min (genType const &x, genType const &y)
template<typename genTypeT , typename genTypeU >
genTypeT mix (genTypeT const &x, genTypeT const &y, genTypeU const &a)
template<typename genType >
genType mod (genType const &x, genType const &y)
template<typename genType >
genType mod (genType const &x, typename genType::value_type const &y)
template<typename genType >
genType modf (genType const &x, genType &i)
template<typename genType >
genType normalize (genType const &x)
template<template< typename > class vecType>
vecType< bool > not_ (vecType< bool > const &v)
template<typename T , template< typename > class vecType>
vecType< T >::bool_type notEqual (vecType< T > const &x, vecType< T > const &y)
template<typename vecType , typename matType >
matType outerProduct (vecType const &c, vecType const &r)
template<typename genType >
genType pow (genType const &x, genType const &y)
template<typename genType >
genType radians (genType const &degrees)
template<typename genType >
genType reflect (genType const &I, genType const &N)
template<typename genType >
genType refract (genType const &I, genType const &N, typename genType::value_type const &eta)
template<typename genType >
genType round (genType const &x)
template<typename genType >
genType roundEven (genType const &x)
template<typename genFIType >
genFIType sign (genFIType const &x)
template<typename genType >
genType sin (genType const &angle)
template<typename genType >
genType sinh (genType const &angle)
template<typename genType >
genType smoothstep (genType const &edge0, genType const &edge1, genType const &x)
template<typename genType >
genType sqrt (genType const &x)
template<typename genType >
genType step (genType const &edge, genType const &x)
template<typename genType >
genType tan (genType const &angle)
template<typename genType >
genType tanh (genType const &angle)
template<typename matType >
matType::transpose_type transpose (matType const &x)
template<typename genType >
genType trunc (genType const &x)
template<typename genUType >
genUType uaddCarry (genUType const &x, genUType const &y, genUType &carry)
template<typename genUType >
void umulExtended (genUType const &x, genUType const &y, genUType &msb, genUType &lsb)
template<typename genUType >
genUType usubBorrow (genUType const &x, genUType const &y, genUType &borrow)

Detailed Description

The functions defined by the specification.


Function Documentation

genFIType glm::core::function::common::abs ( genFIType const &  x)

Returns x if x >= 0; otherwise, it returns -x.

(From GLSL 1.30.08 specification, section 8.3)

genType glm::core::function::trigonometric::acos ( genType const &  x)

Arc cosine.

Returns an angle whose sine is x. The range of values returned by this function is [0, PI]. Results are undefined if |x| > 1. (From GLSL 1.30.08 specification, section 8.1)

genType glm::core::function::trigonometric::acosh ( genType const &  x)

Arc hyperbolic cosine; returns the non-negative inverse of cosh.

Results are undefined if x < 1. (From GLSL 1.30.08 specification, section 8.1)

bool glm::core::function::vector_relational::all ( vecType< bool > const &  v)

Returns true if all components of x are true.

(From GLSL 1.30.08 specification, section 8.6)

Definition at line 165 of file func_vector_relational.hpp.

bool glm::core::function::vector_relational::any ( vecType< bool > const &  v)

Returns true if any component of x is true.

(From GLSL 1.30.08 specification, section 8.6)

Definition at line 151 of file func_vector_relational.hpp.

genType glm::core::function::trigonometric::asin ( genType const &  x)

Arc sine.

Returns an angle whose sine is x. The range of values returned by this function is [-PI/2, PI/2]. Results are undefined if |x| > 1. (From GLSL 1.30.08 specification, section 8.1)

genType glm::core::function::trigonometric::asinh ( genType const &  x)

Arc hyperbolic sine; returns the inverse of sinh.

(From GLSL 1.30.08 specification, section 8.1)

genType glm::core::function::trigonometric::atan ( genType const &  y,
genType const &  x 
)

Arc tangent.

Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLSL 1.30.08 specification, section 8.1)

Referenced by glm::gtx::compatibility::atan2().

genType glm::core::function::trigonometric::atan ( genType const &  y_over_x)

Arc tangent.

Returns an angle whose tangent is y_over_x. The range of values returned by this function is [-PI/2, PI/2]. (From GLSL 1.30.08 specification, section 8.1)

genType glm::core::function::trigonometric::atanh ( genType const &  x)

Arc hyperbolic tangent; returns the inverse of tanh.

Results are undefined if abs(x) >= 1. (From GLSL 1.30.08 specification, section 8.1)

C<T>::signed_type glm::core::function::integer::bitCount ( C< T > const &  Value)

Returns the number of bits set to 1 in the binary representation of value.

(From GLSL 4.00.08 specification, section 8.8)

genIUType glm::core::function::integer::bitfieldExtract ( genIUType const &  Value,
int const &  Offset,
int const &  Bits 
)

Extracts bits [offset, offset + bits - 1] from value, returning them in the least significant bits of the result.

For unsigned data types, the most significant bits of the result will be set to zero. For signed data types, the most significant bits will be set to the value of bit offset + base – 1.

If bits is zero, the result will be zero. The result will be undefined if offset or bits is negative, or if the sum of offset and bits is greater than the number of bits used to store the operand.

(From GLSL 4.00.08 specification, section 8.8)

genIUType glm::core::function::integer::bitfieldInsert ( genIUType const &  Base,
genIUType const &  Insert,
int const &  Offset,
int const &  Bits 
)

Returns the insertion the bits least-significant bits of insert into base.

The result will have bits [offset, offset + bits - 1] taken from bits [0, bits – 1] of insert, and all other bits taken directly from the corresponding bits of base. If bits is zero, the result will simply be base. The result will be undefined if offset or bits is negative, or if the sum of offset and bits is greater than the number of bits used to store the operand.

(From GLSL 4.00.08 specification, section 8.8)

genIUType glm::core::function::integer::bitfieldReverse ( genIUType const &  value)

Returns the reversal of the bits of value.

The bit numbered n of the result will be taken from bit (bits - 1) - n of value, where bits is the total number of bits used to represent value. (From GLSL 4.00.08 specification, section 8.8)

genType glm::core::function::common::ceil ( genType const &  x)

Returns a value equal to the nearest integer that is greater than or equal to x.

(From GLSL 1.30.08 specification, section 8.3)

genType glm::core::function::common::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 and maxVal. (From GLSL 1.30.08 specification, section 8.3)

Referenced by glm::gtx::compatibility::saturate().

genType glm::core::function::trigonometric::cos ( genType const &  angle)

The standard trigonometric cosine function.

The values returned by this function will range from [-1, 1]. (From GLSL 1.30.08 specification, section 8.1)

detail::tvec3<T> glm::core::function::geometric::cross ( detail::tvec3< T > const &  x,
detail::tvec3< T > const &  y 
)

Returns the cross product of x and y.

(From GLSL 1.30.08 specification, section 8.4)

genType glm::core::function::trigonometric::degrees ( genType const &  radians)

Converts radians to degrees and returns the result.

(From GLSL 1.30.08 specification, section 8.1)

detail::tmat2x2<T>::value_type glm::core::function::matrix::determinant ( detail::tmat2x2< T > const &  m)

Return the determinant of a mat2 matrix.

(From GLSL 1.50.09 specification, section 8.5)..

detail::tmat3x3<T>::value_type glm::core::function::matrix::determinant ( detail::tmat3x3< T > const &  m)

Return the determinant of a mat3 matrix.

(From GLSL 1.50.09 specification, section 8.5).

detail::tmat4x4<T>::value_type glm::core::function::matrix::determinant ( detail::tmat4x4< T > const &  m)

Return the determinant of a mat4 matrix.

(From GLSL 1.50.09 specification, section 8.5).

genType::value_type glm::core::function::geometric::distance ( genType const &  p0,
genType const &  p1 
)

Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).

(From GLSL 1.30.08 specification, section 8.4)

genType::value_type glm::core::function::geometric::dot ( genType const &  x,
genType const &  y 
)

Returns the dot product of x and y, i.e., result = x * y.

(From GLSL 1.30.08 specification, section 8.4)

vecType<T>::bool_type glm::core::function::vector_relational::equal ( vecType< T > const &  x,
vecType< T > const &  y 
)

Returns the component-wise comparison of result x == y.

(From GLSL 1.30.08 specification, section 8.6)

Definition at line 116 of file func_vector_relational.hpp.

genType glm::core::function::exponential::exp ( genType const &  x)

Returns the natural exponentiation of x, i.e., e^x.

(From GLSL 1.30.08 specification, section 8.2)

genType glm::core::function::exponential::exp2 ( genType const &  x)

Returns 2 raised to the x power.

(From GLSL 1.30.08 specification, section 8.2)

genType glm::core::function::geometric::faceforward ( genType const &  N,
genType const &  I,
genType const &  Nref 
)

If dot(Nref, I) < 0.0, return N, otherwise, return -N.

(From GLSL 1.30.08 specification, section 8.4)

C<T>::signed_type glm::core::function::integer::findLSB ( C< T > const &  Value)

Returns the bit number of the least significant bit set to 1 in the binary representation of value.

If value is zero, -1 will be returned. (From GLSL 4.00.08 specification, section 8.8)

C<T>::signed_type glm::core::function::integer::findMSB ( C< T > const &  Value)

Returns the bit number of the most significant bit in the binary representation of value.

For positive integers, the result will be the bit number of the most significant bit set to 1. For negative integers, the result will be the bit number of the most significant bit set to 0. For a value of zero or negative one, -1 will be returned. (From GLSL 4.00.08 specification, section 8.8)

genUType floatBitsToInt ( genType const &  value)

Returns a signed or unsigned integer value representing the encoding of a floating-point value.

The floatingpoint value's bit-level representation is preserved. (From GLSL 4.00.08 specification, section 8.3)

genType glm::core::function::common::floor ( genType const &  x)

Returns a value equal to the nearest integer that is less then or equal to x.

(From GLSL 1.30.08 specification, section 8.3)

genType glm::core::function::common::fma ( genType const &  a,
genType const &  b,
genType const &  c 
)

Computes and returns a * b + c.

(From GLSL 4.00.08 specification, section 8.3)

genType glm::core::function::common::fract ( genType const &  x)

Return x - floor(x).

(From GLSL 1.30.08 specification, section 8.3)

genType glm::core::function::common::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, such that: x = significand * exp(2, exponent) The significand is returned by the function and the exponent is returned in the parameter exp.

For a floating-point value of zero, the significant and exponent are both zero. For a floating-point value that is an infinity or is not a number, the results are undefined. (From GLSL 4.00.08 specification, section 8.3)

vecType<T>::bool_type glm::core::function::vector_relational::greaterThan ( vecType< T > const &  x,
vecType< T > const &  y 
)

Returns the component-wise comparison of result x > y.

(From GLSL 1.30.08 specification, section 8.6)

Definition at line 76 of file func_vector_relational.hpp.

vecType<T>::bool_type glm::core::function::vector_relational::greaterThanEqual ( vecType< T > const &  x,
vecType< T > const &  y 
)

Returns the component-wise comparison of result x >= y.

(From GLSL 1.30.08 specification, section 8.6)

Definition at line 96 of file func_vector_relational.hpp.

void glm::core::function::integer::imulExtended ( genIType const &  x,
genIType const &  y,
genIType &  msb,
genIType &  lsb 
)

Multiplies 32-bit integers x and y, producing a 64-bit result.

The 32 least-significant bits are returned in lsb. The 32 most-significant bits are returned in msb. (From GLSL 4.00.08 specification, section 8.8)

genType glm::core::function::common::intBitsToFloat ( genIUType const &  value)

Returns a floating-point value corresponding to a signed or unsigned integer encoding of a floating-point value.

If an inf or NaN is passed in, it will not signal, and the resulting floating point value is unspecified. Otherwise, the bit-level representation is preserved. (From GLSL 4.00.08 specification, section 8.3)

detail::tmat2x2<T> glm::core::function::matrix::inverse ( detail::tmat2x2< T > const &  m)

Return the inverse of a mat2 matrix.

(From GLSL 1.40.07 specification, section 8.5).

detail::tmat3x3<T> glm::core::function::matrix::inverse ( detail::tmat3x3< T > const &  m)

Return the inverse of a mat3 matrix.

(From GLSL 1.40.07 specification, section 8.5).

detail::tmat4x4<T> glm::core::function::matrix::inverse ( detail::tmat4x4< T > const &  m)

Return the inverse of a mat4 matrix.

(From GLSL 1.40.07 specification, section 8.5).

genType glm::core::function::exponential::inversesqrt ( genType const &  x)

Returns the reciprocal of the positive square root of x.

(From GLSL 1.30.08 specification, section 8.2)

genType::bool_type glm::core::function::common::isinf ( genType const &  x)

Returns true if x holds a positive infinity or negative infinity representation in the underlying implementation's set of floating point representations.

Returns false otherwise, including for implementations with no infinity representations. (From GLSL 1.30.08 specification, section 8.3)

genType::bool_type glm::core::function::common::isnan ( genType const &  x)

Returns true if x holds a NaN (not a number) representation in the underlying implementation's set of floating point representations.

Returns false otherwise, including for implementations with no NaN representations. (From GLSL 1.30.08 specification, section 8.3)

genType glm::core::function::common::ldexp ( genType const &  x,
genIType const &  exp 
)

Builds a floating-point number from x and the corresponding integral exponent of two in exp, returning: significand * exp(2, exponent) If this product is too large to be represented in the floating-point type, the result is undefined.

(From GLSL 4.00.08 specification, section 8.3)

genType::value_type glm::core::function::geometric::length ( genType const &  x)

Returns the length of x, i.e., sqrt(x * x).

(From GLSL 1.30.08 specification, section 8.4)

vecType<T>::bool_type glm::core::function::vector_relational::lessThan ( vecType< T > const &  x,
vecType< T > const &  y 
)

Returns the component-wise comparison result of x < y.

(From GLSL 1.30.08 specification, section 8.6)

Definition at line 35 of file func_vector_relational.hpp.

vecType<T>::bool_type glm::core::function::vector_relational::lessThanEqual ( vecType< T > const &  x,
vecType< T > const &  y 
)

Returns the component-wise comparison of result x <= y.

(From GLSL 1.30.08 specification, section 8.6)

Definition at line 56 of file func_vector_relational.hpp.

genType glm::core::function::exponential::log ( genType const &  x)

Returns the natural logarithm of x, i.e., returns the value y which satisfies the equation x = e^y.

Results are undefined if x <= 0. (From GLSL 1.30.08 specification, section 8.2)

genType glm::core::function::exponential::log2 ( genType const &  x)

Returns the base 2 log of x, i.e., returns the value y, which satisfies the equation x = 2 ^ y.

(From GLSL 1.30.08 specification, section 8.2)

matType glm::core::function::matrix::matrixCompMult ( matType const &  x,
matType const &  y 
)

Multiply matrix x by matrix y component-wise, i.e., result[i][j] is the scalar product of x[i][j] and y[i][j].

(From GLSL 1.30.08 specification, section 8.5)

genType glm::core::function::common::max ( genType const &  x,
genType const &  y 
)

Returns y if x < y; otherwise, it returns x.

(From GLSL 1.30.08 specification, section 8.3)

genType glm::core::function::common::min ( genType const &  x,
genType const &  y 
)

Returns y if y < x; otherwise, it returns x.

(From GLSL 1.30.08 specification, section 8.3)

genTypeT glm::core::function::common::mix ( genTypeT const &  x,
genTypeT const &  y,
genTypeU const &  a 
)
Returns:
If genTypeU is a floating scalar or vector: Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1].
If genTypeU is a boolean scalar or vector: Selects which vector each returned component comes from. For a component of a that is false, the corresponding component of x is returned. For a component of a that is true, the corresponding component of y is returned. Components of x and y that are not selected are allowed to be invalid floating point values and will have no effect on the results. Thus, this provides different functionality than genType mix(genType x, genType y, genType(a)) where a is a Boolean vector.

From GLSL 1.30.08 specification, section 8.3

Parameters:
[in]xFloating point scalar or vector.
[in]yFloating point scalar or vector.
[in]aFloating point or boolean scalar or vector.

Referenced by glm::gtx::compatibility::lerp().

genType glm::core::function::common::mod ( genType const &  x,
genType const &  y 
)

Modulus.

Returns x - y * floor(x / y) for each component in x using the floating point value y. (From GLSL 1.30.08 specification, section 8.3)

genType glm::core::function::common::mod ( genType const &  x,
typename genType::value_type const &  y 
)

Modulus.

Returns x - y * floor(x / y) for each component in x using the floating point value y. (From GLSL 1.30.08 specification, section 8.3)

genType glm::core::function::common::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 value).

Both the return value and the output parameter will have the same sign as x. (From GLSL 1.30.08 specification, section 8.3)

genType glm::core::function::geometric::normalize ( genType const &  x)

Returns a vector in the same direction as x but with length of 1.

(From GLSL 1.30.08 specification, section 8.4)

vecType<bool> glm::core::function::vector_relational::not_ ( vecType< bool > const &  v)

Returns the component-wise logical complement of x.

(From GLSL 1.30.08 specification, section 8.6)

Definition at line 179 of file func_vector_relational.hpp.

vecType<T>::bool_type glm::core::function::vector_relational::notEqual ( vecType< T > const &  x,
vecType< T > const &  y 
)

Returns the component-wise comparison of result x != y.

(From GLSL 1.30.08 specification, section 8.6)

Definition at line 134 of file func_vector_relational.hpp.

matType glm::core::function::matrix::outerProduct ( vecType const &  c,
vecType const &  r 
)

Treats the first parameter c as a column vector and the second parameter r as a row vector and does a linear algebraic matrix multiply c * r.

(From GLSL 1.30.08 specification, section 8.5)

genType glm::core::function::exponential::pow ( genType const &  x,
genType const &  y 
)

Returns x raised to the y power.

(From GLSL 1.30.08 specification, section 8.2)

genType glm::core::function::trigonometric::radians ( genType const &  degrees)

Converts degrees to radians and returns the result.

(From GLSL 1.30.08 specification, section 8.1)

genType glm::core::function::geometric::reflect ( genType const &  I,
genType const &  N 
)

For the incident vector I and surface orientation N, returns the reflection direction : result = I - 2.0 * dot(N, I) * N.

(From GLSL 1.30.08 specification, section 8.4)

genType glm::core::function::geometric::refract ( genType const &  I,
genType const &  N,
typename genType::value_type const &  eta 
)

For the incident vector I and surface normal N, and the ratio of indices of refraction eta, return the refraction vector.

(From GLSL 1.30.08 specification, section 8.4)

genType glm::core::function::common::round ( genType const &  x)

Returns a value equal to the nearest integer to x.

The fraction 0.5 will round in a direction chosen by the implementation, presumably the direction that is fastest. This includes the possibility that round(x) returns the same value as roundEven(x) for all values of x. (From GLSL 1.30.08 specification, section 8.3)

genType glm::core::function::common::roundEven ( genType const &  x)

Returns a value equal to the nearest integer to x.

A fractional part of 0.5 will round toward the nearest even integer. (Both 3.5 and 4.5 for x will return 4.0.) (From GLSL 1.30.08 specification, section 8.3)

genFIType glm::core::function::common::sign ( genFIType const &  x)

Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0.

(From GLSL 1.30.08 specification, section 8.3)

genType glm::core::function::trigonometric::sin ( genType const &  angle)

The standard trigonometric sine function.

The values returned by this function will range from [-1, 1]. (From GLSL 1.30.08 specification, section 8.1)

genType glm::core::function::common::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 and 1 when edge0 < x < edge1.

This is useful in cases where you would want a threshold function with a smooth transition. This is equivalent to: genType t; t = clamp ((x – edge0) / (edge1 – edge0), 0, 1); return t * t * (3 – 2 * t); Results are undefined if edge0 >= edge1. (From GLSL 1.30.08 specification, section 8.3)

genType glm::core::function::exponential::sqrt ( genType const &  x)

Returns the positive square root of x.

(From GLSL 1.30.08 specification, section 8.2)

genType glm::core::function::common::step ( genType const &  edge,
genType const &  x 
)

Returns 0.0 if x < edge, otherwise it returns 1.0.

(From GLSL 1.30.08 specification, section 8.3)

genType glm::core::function::trigonometric::tan ( genType const &  angle)

The standard trigonometric tangent function.

(From GLSL 1.30.08 specification, section 8.1)

genType glm::core::function::common::trunc ( genType const &  x)

Returns a value equal to the nearest integer to x whose absolute value is not larger than the absolute value of x.

(From GLSL 1.30.08 specification, section 8.3)

genUType glm::core::function::integer::uaddCarry ( genUType const &  x,
genUType const &  y,
genUType &  carry 
)

Adds 32-bit unsigned integer x and y, returning the sum modulo pow(2, 32).

The value carry is set to 0 if the sum was less than pow(2, 32), or to 1 otherwise.

(From GLSL 4.00.08 specification, section 8.8)

void glm::core::function::integer::umulExtended ( genUType const &  x,
genUType const &  y,
genUType &  msb,
genUType &  lsb 
)

Multiplies 32-bit integers x and y, producing a 64-bit result.

The 32 least-significant bits are returned in lsb. The 32 most-significant bits are returned in msb. (From GLSL 4.00.08 specification, section 8.8)

genUType glm::core::function::integer::usubBorrow ( genUType const &  x,
genUType const &  y,
genUType &  borrow 
)

Subtracts the 32-bit unsigned integer y from x, returning the difference if non-negative, or pow(2, 32) plus the difference otherwise.

The value borrow is set to 0 if x >= y, or to 1 otherwise.

(From GLSL 4.00.08 specification, section 8.8)