0.9.6
gtx/integer.hpp
Go to the documentation of this file.
1 
38 #pragma once
39 
40 // Dependency:
41 #include "../glm.hpp"
42 #include "../gtc/integer.hpp"
43 
44 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
45 # pragma message("GLM: GLM_GTX_integer extension included")
46 #endif
47 
48 namespace glm
49 {
52 
55  GLM_FUNC_DECL int pow(int x, int y);
56 
59  GLM_FUNC_DECL int sqrt(int x);
60 
63  GLM_FUNC_DECL unsigned int floor_log2(unsigned int x);
64 
67  GLM_FUNC_DECL int mod(int x, int y);
68 
71  template <typename genType>
72  GLM_FUNC_DECL genType factorial(genType const & x);
73 
76  typedef signed int sint;
77 
80  GLM_FUNC_DECL uint pow(uint x, uint y);
81 
84  GLM_FUNC_DECL uint sqrt(uint x);
85 
88  GLM_FUNC_DECL uint mod(uint x, uint y);
89 
92  GLM_FUNC_DECL uint nlz(uint x);
93 
95 }//namespace glm
96 
97 #include "integer.inl"
GLM_FUNC_DECL uint sqrt(uint x)
Returns the positive square root of x.
GLM_FUNC_DECL uint mod(uint x, uint y)
Modulus.
unsigned int uint
Unsigned integer type.
Definition: type_int.hpp:302
GLM_FUNC_DECL unsigned int floor_log2(unsigned int x)
Returns the floor log2 of x.
GLM_FUNC_DECL uint nlz(uint x)
Returns the number of leading zeros.
Definition: _noise.hpp:31
signed int sint
32bit signed integer.
Definition: gtx/integer.hpp:76
GLM_FUNC_DECL uint pow(uint x, uint y)
Returns x raised to the y power.
GLM_FUNC_DECL genType factorial(genType const &x)
Return the factorial value of a number (!12 max, integer only) From GLM_GTX_integer extension...