1.0.0 API documentation
gtx/integer.hpp
Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 #include "../gtc/integer.hpp"
18 
19 #ifndef GLM_ENABLE_EXPERIMENTAL
20 # error "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."
21 #elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
22 # pragma message("GLM: GLM_GTX_integer extension included")
23 #endif
24 
25 namespace glm
26 {
29 
32  GLM_FUNC_DECL int pow(int x, uint y);
33 
36  GLM_FUNC_DECL int sqrt(int x);
37 
40  GLM_FUNC_DECL unsigned int floor_log2(unsigned int x);
41 
44  GLM_FUNC_DECL int mod(int x, int y);
45 
48  template<typename genType>
49  GLM_FUNC_DECL genType factorial(genType const& x);
50 
53  typedef signed int sint;
54 
57  GLM_FUNC_DECL uint pow(uint x, uint y);
58 
61  GLM_FUNC_DECL uint sqrt(uint x);
62 
65  GLM_FUNC_DECL uint mod(uint x, uint y);
66 
69  GLM_FUNC_DECL uint nlz(uint x);
70 
72 }//namespace glm
73 
74 #include "integer.inl"
glm::sint
signed int sint
32bit signed integer.
Definition: gtx/integer.hpp:53
glm::mod
GLM_FUNC_DECL uint mod(uint x, uint y)
Modulus.
glm::sqrt
GLM_FUNC_DECL uint sqrt(uint x)
Returns the positive square root of x.
glm::nlz
GLM_FUNC_DECL uint nlz(uint x)
Returns the number of leading zeros.
glm::pow
GLM_FUNC_DECL uint pow(uint x, uint y)
Returns x raised to the y power.
glm::factorial
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::floor_log2
GLM_FUNC_DECL unsigned int floor_log2(unsigned int x)
Returns the floor log2 of x.