| 0.9.8

- Main Page
- Modules
- Files

- File List

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 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
20 # pragma message("GLM: GLM_GTX_integer extension included")
21 #endif
22
23 namespace glm
24 {
27
30 GLM_FUNC_DECL int pow(int x, int y);
31
34 GLM_FUNC_DECL int sqrt(int x);
35
38 GLM_FUNC_DECL unsigned int floor_log2(unsigned int x);
39
42 GLM_FUNC_DECL int mod(int x, int y);
43
46 template <typename genType>
47 GLM_FUNC_DECL genType factorial(genType const & x);
48
51 typedef signed int sint;
52
55 GLM_FUNC_DECL uint pow(uint x, uint y);
56
59 GLM_FUNC_DECL uint sqrt(uint x);
60
63 GLM_FUNC_DECL uint mod(uint x, uint y);
64
67 GLM_FUNC_DECL uint nlz(uint x);
68
70 }//namespace glm
71
72 #include "integer.inl"
glm::mod
GLM_FUNC_DECL uint mod(uint x, uint y)
Modulus.
glm::sint
signed int sint
32bit signed integer.
Definition: gtx/integer.hpp:51
glm::uint
unsigned int uint
Unsigned integer type.
Definition: type_int.hpp:288
glm
Definition: _noise.hpp:11
glm::pow
GLM_FUNC_DECL uint pow(uint x, uint y)
Returns x raised to the y power.
glm::nlz
GLM_FUNC_DECL uint nlz(uint x)
Returns the number of leading zeros.
glm::sqrt
GLM_FUNC_DECL uint sqrt(uint x)
Returns the positive square root of x.
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.