17 #include "../gtc/integer.hpp" 19 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 # ifndef GLM_ENABLE_EXPERIMENTAL 21 # pragma message("GLM: GLM_GTX_integer is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.") 23 # pragma message("GLM: GLM_GTX_integer extension included") 34 GLM_FUNC_DECL
int pow(
int x, uint y);
38 GLM_FUNC_DECL
int sqrt(
int x);
42 GLM_FUNC_DECL
unsigned int floor_log2(
unsigned int x);
46 GLM_FUNC_DECL
int mod(
int x,
int y);
50 template<
typename genType>
51 GLM_FUNC_DECL genType
factorial(genType
const& x);
59 GLM_FUNC_DECL uint
pow(uint x, uint y);
63 GLM_FUNC_DECL uint
sqrt(uint x);
67 GLM_FUNC_DECL uint mod(uint x, uint y);
71 GLM_FUNC_DECL uint
nlz(uint x);
76 #include "integer.inl" Core features
Definition: common.hpp:20
GLM_FUNC_DECL unsigned int floor_log2(unsigned int x)
Returns the floor log2 of x.
GLM_FUNC_QUALIFIER vec< L, T, Q > sqrt(vec< L, T, Q > const &x)
Returns the positive square root of v.
Definition: func_exponential.inl:128
GLM_FUNC_QUALIFIER vec< L, T, Q > pow(vec< L, T, Q > const &base, vec< L, T, Q > const &exponent)
Returns 'base' raised to the power 'exponent'.
Definition: func_exponential.inl:72
GLM_FUNC_DECL uint nlz(uint x)
Returns the number of leading zeros.
Definition: integer.inl:154
GLM_FUNC_DECL genType factorial(genType const &x)
Return the factorial value of a number (!12 max, integer only) From GLM_GTX_integer extension...
Definition: integer.inl:73
signed int sint
32bit signed integer.
Definition: integer.hpp:55