0.9.7
Functions

Functions

template<typename genIUType >
GLM_FUNC_DECL genIUType log2 (genIUType x)
 
template<typename genIUType >
GLM_FUNC_DECL genIUType mod (genIUType x, genIUType y)
 
template<typename T , precision P, template< typename, precision > class vecType>
GLM_FUNC_DECL vecType< T, P > mod (vecType< T, P > const &x, T y)
 
template<typename T , precision P, template< typename, precision > class vecType>
GLM_FUNC_DECL vecType< T, P > mod (vecType< T, P > const &x, vecType< T, P > const &y)
 

Detailed Description

Allow to perform bit operations on integer values.

<glm/gtc/integer.hpp> need to be included to use these functionalities.

Function Documentation

GLM_FUNC_DECL genIUType glm::log2 ( genIUType  x)

Returns the log2 of x for integer values.

Can be reliably using to compute mipmap count from the texture size.

See also
GLM_GTC_integer
GLM_FUNC_DECL genIUType glm::mod ( genIUType  x,
genIUType  y 
)

Modulus.

Returns x % y for each component in x using the floating point value y.

Template Parameters
genIUTypeInteger-point scalar or vector types.
See also
GLM_GTC_integer
GLSL mod man page
GLSL 4.20.8 specification, section 8.3 Common Functions
GLM_FUNC_DECL vecType< T, P > mod ( vecType< T, P > const &  x,
y 
)

Modulus.

Returns x % y for each component in x using the floating point value y.

Template Parameters
TInteger scalar types.
vecTypevector types.
See also
GLM_GTC_integer
GLSL mod man page
GLSL 4.20.8 specification, section 8.3 Common Functions
GLM_FUNC_DECL vecType< T, P > mod ( vecType< T, P > const &  x,
vecType< T, P > const &  y 
)

Modulus.

Returns x % y for each component in x using the floating point value y.

Template Parameters
TInteger scalar types.
vecTypevector types.
See also
GLM_GTC_integer
GLSL mod man page
GLSL 4.20.8 specification, section 8.3 Common Functions