| 1.0.2 API documentation

vector_integer.hpp
Go to the documentation of this file.
1
12 #pragma once
13
14 // Dependencies
15 #include "../detail/setup.hpp"
16 #include "../detail/qualifier.hpp"
17 #include "../detail/_vectorize.hpp"
18 #include "../vector_relational.hpp"
19 #include "../common.hpp"
20 #include <limits>
21
22 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_EXT_vector_integer extension included")
24 #endif
25
26 namespace glm
27 {
30
38 template<length_t L, typename T, qualifier Q>
39 GLM_FUNC_DECL vec<L, bool, Q> isPowerOfTwo(vec<L, T, Q> const& v);
40
49 template<length_t L, typename T, qualifier Q>
50 GLM_FUNC_DECL vec<L, T, Q> nextPowerOfTwo(vec<L, T, Q> const& v);
51
60 template<length_t L, typename T, qualifier Q>
61 GLM_FUNC_DECL vec<L, T, Q> prevPowerOfTwo(vec<L, T, Q> const& v);
62
70 template<length_t L, typename T, qualifier Q>
71 GLM_FUNC_DECL vec<L, bool, Q> isMultiple(vec<L, T, Q> const& v, T Multiple);
72
80 template<length_t L, typename T, qualifier Q>
81 GLM_FUNC_DECL vec<L, bool, Q> isMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
82
93 template<length_t L, typename T, qualifier Q>
94 GLM_FUNC_DECL vec<L, T, Q> nextMultiple(vec<L, T, Q> const& v, T Multiple);
95
106 template<length_t L, typename T, qualifier Q>
107 GLM_FUNC_DECL vec<L, T, Q> nextMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
108
119 template<length_t L, typename T, qualifier Q>
120 GLM_FUNC_DECL vec<L, T, Q> prevMultiple(vec<L, T, Q> const& v, T Multiple);
121
132 template<length_t L, typename T, qualifier Q>
133 GLM_FUNC_DECL vec<L, T, Q> prevMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
134
143 template<length_t L, typename T, qualifier Q>
144 GLM_FUNC_DECL vec<L, int, Q> findNSB(vec<L, T, Q> const& Source, vec<L, int, Q> SignificantBitCount);
145
147 } //namespace glm
148
149 #include "vector_integer.inl"
glm::nextMultiple
GLM_FUNC_DECL vec< L, T, Q > nextMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
Higher multiple number of Source.
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 'Value' is a multiple of 'Multiple'.
glm::nextPowerOfTwo
GLM_FUNC_DECL vec< L, T, Q > nextPowerOfTwo(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::prevPowerOfTwo
GLM_FUNC_DECL vec< L, T, Q > prevPowerOfTwo(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::findNSB
GLM_FUNC_DECL vec< L, int, Q > findNSB(vec< L, T, Q > const &Source, vec< L, int, Q > SignificantBitCount)
Returns the bit number of the Nth significant bit set to 1 in the binary representation of value.
glm::prevMultiple
GLM_FUNC_DECL vec< L, T, Q > prevMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
Lower multiple number of Source.
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.