0.9.9 API documenation
gtc/integer.hpp
Go to the documentation of this file.
1 
14 #pragma once
15 
16 // Dependencies
17 #include "../detail/setup.hpp"
18 #include "../detail/qualifier.hpp"
19 #include "../detail/func_common.hpp"
20 #include "../detail/func_integer.hpp"
21 #include "../detail/func_exponential.hpp"
22 #include <limits>
23 
24 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTC_integer extension included")
26 #endif
27 
28 namespace glm
29 {
32 
35  template<typename genIUType>
36  GLM_FUNC_DECL genIUType log2(genIUType x);
37 
46  template<typename genIUType>
47  GLM_FUNC_DECL genIUType mod(genIUType x, genIUType y);
48 
57  template<length_t L, typename T, qualifier P>
58  GLM_FUNC_DECL vec<L, T, P> mod(vec<L, T, P> const& x, T y);
59 
68  template<length_t L, typename T, qualifier P>
69  GLM_FUNC_DECL vec<L, T, P> mod(vec<L, T, P> const& x, vec<L, T, P> const& y);
70 
80  template<length_t L, typename T, qualifier P>
81  GLM_FUNC_DECL vec<L, int, P> iround(vec<L, T, P> const& x);
82 
92  template<length_t L, typename T, qualifier P>
93  GLM_FUNC_DECL vec<L, uint, P> uround(vec<L, T, P> const& x);
94 
96 } //namespace glm
97 
98 #include "integer.inl"
GLM_FUNC_DECL genIUType log2(genIUType x)
Returns the log2 of x for integer values.
GLM_FUNC_DECL vec< L, uint, P > uround(vec< L, T, P > const &x)
Returns a value equal to the nearest integer to x.
Definition: _noise.hpp:11
GLM_FUNC_DECL vec< L, int, P > iround(vec< L, T, P > const &x)
Returns a value equal to the nearest integer to x.
GLM_FUNC_DECL genIUType mod(genIUType x, genIUType y)
Modulus.