0.9.6: integer.hpp Source File

| 0.9.6

- Main Page
- Modules
- Files

- File List

gtx/integer.hpp
Go to the documentation of this file.
1
42 #pragma once
43
44 // Dependency:
45 #include "../glm.hpp"
46 #include "../gtc/integer.hpp"
47
48 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
49 # pragma message("GLM: GLM_GTX_integer extension included")
50 #endif
51
52 namespace glm
53 {
56
59 GLM_FUNC_DECL int pow(int x, int y);
60
63 GLM_FUNC_DECL int sqrt(int x);
64
67 GLM_FUNC_DECL unsigned int floor_log2(unsigned int x);
68
71 GLM_FUNC_DECL int mod(int x, int y);
72
75 template <typename genType>
76 GLM_FUNC_DECL genType factorial(genType const & x);
77
80 typedef signed int sint;
81
84 GLM_FUNC_DECL uint pow(uint x, uint y);
85
88 GLM_FUNC_DECL uint sqrt(uint x);
89
92 GLM_FUNC_DECL uint mod(uint x, uint y);
93
96 GLM_FUNC_DECL uint nlz(uint x);
97
99 }//namespace glm
100
101 #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:80
glm::uint
unsigned int uint
Unsigned integer type.
Definition: type_int.hpp:306
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
Definition: _noise.hpp:39
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.