| 0.9.9 API documenation

round.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/_vectorize.hpp"
20 #include "../vector_relational.hpp"
21 #include "../common.hpp"
22 #include <limits>
23
24 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTC_integer extension included")
26 #endif
27
28 namespace glm
29 {
32
36 template<typename genIUType>
37 GLM_FUNC_DECL bool isPowerOfTwo(genIUType v);
38
46 template<length_t L, typename T, qualifier Q>
47 GLM_FUNC_DECL vec<L, bool, Q> isPowerOfTwo(vec<L, T, Q> const& v);
48
53 template<typename genIUType>
54 GLM_FUNC_DECL genIUType ceilPowerOfTwo(genIUType v);
55
64 template<length_t L, typename T, qualifier Q>
65 GLM_FUNC_DECL vec<L, T, Q> ceilPowerOfTwo(vec<L, T, Q> const& v);
66
71 template<typename genIUType>
72 GLM_FUNC_DECL genIUType floorPowerOfTwo(genIUType v);
73
82 template<length_t L, typename T, qualifier Q>
83 GLM_FUNC_DECL vec<L, T, Q> floorPowerOfTwo(vec<L, T, Q> const& v);
84
88 template<typename genIUType>
89 GLM_FUNC_DECL genIUType roundPowerOfTwo(genIUType v);
90
98 template<length_t L, typename T, qualifier Q>
99 GLM_FUNC_DECL vec<L, T, Q> roundPowerOfTwo(vec<L, T, Q> const& v);
100
104 template<typename genIUType>
105 GLM_FUNC_DECL bool isMultiple(genIUType v, genIUType Multiple);
106
114 template<length_t L, typename T, qualifier Q>
115 GLM_FUNC_DECL vec<L, bool, Q> isMultiple(vec<L, T, Q> const& v, T Multiple);
116
124 template<length_t L, typename T, qualifier Q>
125 GLM_FUNC_DECL vec<L, bool, Q> isMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
126
135 template<typename genType>
136 GLM_FUNC_DECL genType ceilMultiple(genType v, genType Multiple);
137
148 template<length_t L, typename T, qualifier Q>
149 GLM_FUNC_DECL vec<L, T, Q> ceilMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
150
159 template<typename genType>
160 GLM_FUNC_DECL genType floorMultiple(genType v, genType Multiple);
161
172 template<length_t L, typename T, qualifier Q>
173 GLM_FUNC_DECL vec<L, T, Q> floorMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
174
183 template<typename genType>
184 GLM_FUNC_DECL genType roundMultiple(genType v, genType Multiple);
185
196 template<length_t L, typename T, qualifier Q>
197 GLM_FUNC_DECL vec<L, T, Q> roundMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
198
200 } //namespace glm
201
202 #include "round.inl"
glm::floorMultiple
GLM_FUNC_DECL vec< L, T, Q > floorMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
Lower multiple number of Source.
glm::ceilMultiple
GLM_FUNC_DECL vec< L, T, Q > ceilMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
Higher multiple number of Source.
glm::floorPowerOfTwo
GLM_FUNC_DECL vec< L, T, Q > floorPowerOfTwo(vec< L, T, Q > const &v)
Return the power of two number which value is just lower the input value, round down to a power of tw...
glm::isMultiple
GLM_FUNC_DECL vec< L, bool, Q > isMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
Return true if the &#39;Value&#39; is a multiple of &#39;Multiple&#39;.
glm::ceilPowerOfTwo
GLM_FUNC_DECL vec< L, T, Q > ceilPowerOfTwo(vec< L, T, Q > const &v)
Return the power of two number which value is just higher the input value, round up to a power of two...
glm::isPowerOfTwo
GLM_FUNC_DECL vec< L, bool, Q > isPowerOfTwo(vec< L, T, Q > const &v)
Return true if the value is a power of two number.
glm::roundPowerOfTwo
GLM_FUNC_DECL vec< L, T, Q > roundPowerOfTwo(vec< L, T, Q > const &v)
Return the power of two number which value is the closet to the input value.
glm
Definition: common.hpp:20
glm::roundMultiple
GLM_FUNC_DECL vec< L, T, Q > roundMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
Lower multiple number of Source.