0.9.9 API documentation
Loading...
Searching...
No Matches

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

Typedefs

typedef signed int sint
 32bit signed integer.
 

Functions

template<typename genType >
GLM_FUNC_DECL genType factorial (genType const &x)
 Return the factorial value of a number (!12 max, integer only) From GLM_GTX_integer extension.
 
GLM_FUNC_DECL unsigned int floor_log2 (unsigned int x)
 Returns the floor log2 of x.
 
GLM_FUNC_DECL int mod (int x, int y)
 Modulus.
 
GLM_FUNC_DECL uint mod (uint x, uint y)
 Modulus.
 
GLM_FUNC_DECL uint nlz (uint x)
 Returns the number of leading zeros.
 
GLM_FUNC_DECL int pow (int x, uint y)
 Returns x raised to the y power.
 
GLM_FUNC_DECL uint pow (uint x, uint y)
 Returns x raised to the y power.
 
GLM_FUNC_DECL int sqrt (int x)
 Returns the positive square root of x.
 
GLM_FUNC_DECL uint sqrt (uint x)
 Returns the positive square root of x.
 

Detailed Description

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

Add support for integer for core functions

Typedef Documentation

◆ sint

typedef signed int sint

32bit signed integer.

From GLM_GTX_integer extension.

Definition at line 55 of file integer.hpp.

Function Documentation

◆ floor_log2()

GLM_FUNC_DECL unsigned int floor_log2 ( unsigned int x)

Returns the floor log2 of x.

From GLM_GTX_integer extension.

◆ mod() [1/2]

GLM_FUNC_DECL int mod ( int x,
int y )

Modulus.

Returns x - y * floor(x / y) for each component in x using the floating point value y. From GLM_GTX_integer extension.

◆ mod() [2/2]

GLM_FUNC_DECL uint mod ( uint x,
uint y )

Modulus.

Returns x - y * floor(x / y) for each component in x using the floating point value y. From GLM_GTX_integer extension.

◆ nlz()

GLM_FUNC_DECL uint nlz ( uint x)

Returns the number of leading zeros.

From GLM_GTX_integer extension.

◆ pow() [1/2]

GLM_FUNC_DECL int pow ( int x,
uint y )

Returns x raised to the y power.

From GLM_GTX_integer extension.

◆ pow() [2/2]

GLM_FUNC_DECL uint pow ( uint x,
uint y )

Returns x raised to the y power.

From GLM_GTX_integer extension.

◆ sqrt() [1/2]

GLM_FUNC_DECL int sqrt ( int x)

Returns the positive square root of x.

From GLM_GTX_integer extension.

◆ sqrt() [2/2]

GLM_FUNC_DECL uint sqrt ( uint x)

Returns the positive square root of x.

From GLM_GTX_integer extension.