17 #include "../detail/setup.hpp"
18 #include "../detail/qualifier.hpp"
19 #include "../detail/_vectorize.hpp"
20 #include "../vector_relational.hpp"
21 #include "../common.hpp"
24 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
25 # pragma message("GLM: GLM_GTC_integer extension included")
36 template<
typename genIUType>
42 template<length_t L,
typename T, qualifier P>
43 GLM_FUNC_DECL vec<L, bool, P>
isPowerOfTwo(vec<L, T, P>
const& value);
49 template<
typename genIUType>
56 template<length_t L,
typename T, qualifier P>
57 GLM_FUNC_DECL vec<L, T, P>
ceilPowerOfTwo(vec<L, T, P>
const& value);
63 template<
typename genIUType>
70 template<length_t L,
typename T, qualifier P>
76 template<
typename genIUType>
82 template<length_t L,
typename T, qualifier P>
88 template<
typename genIUType>
89 GLM_FUNC_DECL
bool isMultiple(genIUType Value, genIUType Multiple);
94 template<length_t L,
typename T, qualifier P>
95 GLM_FUNC_DECL vec<L, bool, P>
isMultiple(vec<L, T, P>
const& Value, T Multiple);
100 template<length_t L,
typename T, qualifier P>
101 GLM_FUNC_DECL vec<L, bool, P>
isMultiple(vec<L, T, P>
const& Value, vec<L, T, P>
const& Multiple);
109 template<
typename genType>
110 GLM_FUNC_DECL genType
ceilMultiple(genType Source, genType Multiple);
118 template<length_t L,
typename T, qualifier P>
119 GLM_FUNC_DECL vec<L, T, P>
ceilMultiple(vec<L, T, P>
const & Source, vec<L, T, P>
const& Multiple);
127 template<
typename genType>
128 GLM_FUNC_DECL genType
floorMultiple(genType Source, genType Multiple);
136 template<length_t L,
typename T, qualifier P>
137 GLM_FUNC_DECL vec<L, T, P>
floorMultiple(vec<L, T, P>
const& Source, vec<L, T, P>
const& Multiple);
145 template<
typename genType>
146 GLM_FUNC_DECL genType
roundMultiple(genType Source, genType Multiple);
154 template<length_t L,
typename T, qualifier P>
155 GLM_FUNC_DECL vec<L, T, P>
roundMultiple(vec<L, T, P>
const& Source, vec<L, T, P>
const& Multiple);
GLM_FUNC_DECL vec< L, T, P > ceilMultiple(vec< L, T, P > const &Source, vec< L, T, P > const &Multiple)
Higher multiple number of Source.
GLM_FUNC_DECL vec< L, bool, P > isMultiple(vec< L, T, P > const &Value, vec< L, T, P > const &Multiple)
Return true if the 'Value' is a multiple of 'Multiple'.
GLM_FUNC_DECL vec< L, bool, P > isPowerOfTwo(vec< L, T, P > const &value)
Return true if the value is a power of two number.
GLM_FUNC_DECL vec< L, T, P > ceilPowerOfTwo(vec< L, T, P > const &value)
Return the power of two number which value is just higher the input value, round up to a power of two...
GLM_FUNC_DECL vec< L, T, P > roundPowerOfTwo(vec< L, T, P > const &value)
Return the power of two number which value is the closet to the input value.
GLM_FUNC_DECL vec< L, T, P > roundMultiple(vec< L, T, P > const &Source, vec< L, T, P > const &Multiple)
Lower multiple number of Source.
GLM_FUNC_DECL vec< L, T, P > floorMultiple(vec< L, T, P > const &Source, vec< L, T, P > const &Multiple)
Lower multiple number of Source.
GLM_FUNC_DECL vec< L, T, P > floorPowerOfTwo(vec< L, T, P > const &value)
Return the power of two number which value is just lower the input value, round down to a power of tw...