Clutter Engine 0.0.1
Loading...
Searching...
No Matches
GLM_GTC_integer

Allow to perform bit operations on integer values. More...

Functions

template<typename genIUType >
GLM_FUNC_DECL genIUType glm::log2 (genIUType x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, int, Q > glm::iround (vec< L, T, Q > const &x)
 
template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, uint, Q > glm::uround (vec< L, T, Q > const &x)
 

Detailed Description

Allow to perform bit operations on integer values.

Include <glm/gtc/integer.hpp> to use the features of this extension.

Function Documentation

◆ iround()

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, int, Q > glm::iround ( vec< L, T, Q > 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.

Parameters
xThe values of the argument must be greater or equal to zero.
Template Parameters
Tfloating point scalar types.
See also
GLSL round man page
GLM_GTC_integer

◆ log2()

template<typename genIUType >
GLM_FUNC_DECL genIUType glm::log2 ( genIUType x)

Returns the log2 of x for integer values. Usefull to compute mipmap count from the texture size.

See also
GLM_GTC_integer

◆ uround()

template<length_t L, typename T , qualifier Q>
GLM_FUNC_DECL vec< L, uint, Q > glm::uround ( vec< L, T, Q > 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.

Parameters
xThe values of the argument must be greater or equal to zero.
Template Parameters
Tfloating point scalar types.
See also
GLSL round man page
GLM_GTC_integer