0.9.8: integer.hpp Source File

| 0.9.8

- Main Page
- Modules
- Files

- File List

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/precision.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
58 template <typename T, precision P, template <typename, precision> class vecType>
59 GLM_FUNC_DECL vecType<T, P> mod(vecType<T, P> const & x, T y);
60
70 template <typename T, precision P, template <typename, precision> class vecType>
71 GLM_FUNC_DECL vecType<T, P> mod(vecType<T, P> const & x, vecType<T, P> const & y);
72
83 template <typename T, precision P, template <typename, precision> class vecType>
84 GLM_FUNC_DECL vecType<int, P> iround(vecType<T, P> const & x);
85
96 template <typename T, precision P, template <typename, precision> class vecType>
97 GLM_FUNC_DECL vecType<uint, P> uround(vecType<T, P> const & x);
98
100 } //namespace glm
101
102 #include "integer.inl"
glm::uround
GLM_FUNC_DECL vecType< uint, P > uround(vecType< T, P > const &x)
Returns a value equal to the nearest integer to x.
glm::log2
GLM_FUNC_DECL genIUType log2(genIUType x)
Returns the log2 of x for integer values.
glm
Definition: _noise.hpp:11
glm::mod
GLM_FUNC_DECL genIUType mod(genIUType x, genIUType y)
Modulus.
glm::iround
GLM_FUNC_DECL vecType< int, P > iround(vecType< T, P > const &x)
Returns a value equal to the nearest integer to x.