17 #include "../detail/setup.hpp"
18 #include "../detail/precision.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 <
typename T, precision P,
template <
typename, precision>
class vecType>
43 GLM_FUNC_DECL vecType<bool, P>
isPowerOfTwo(vecType<T, P>
const & value);
49 template <
typename genIUType>
56 template <
typename T, precision P,
template <
typename, precision>
class vecType>
57 GLM_FUNC_DECL vecType<T, P>
ceilPowerOfTwo(vecType<T, P>
const & value);
63 template <
typename genIUType>
70 template <
typename T, precision P,
template <
typename, precision>
class vecType>
71 GLM_FUNC_DECL vecType<T, P>
floorPowerOfTwo(vecType<T, P>
const & value);
76 template <
typename genIUType>
82 template <
typename T, precision P,
template <
typename, precision>
class vecType>
83 GLM_FUNC_DECL vecType<T, P>
roundPowerOfTwo(vecType<T, P>
const & value);
88 template <
typename genIUType>
89 GLM_FUNC_DECL
bool isMultiple(genIUType Value, genIUType Multiple);
94 template <
typename T, precision P,
template <
typename, precision>
class vecType>
95 GLM_FUNC_DECL vecType<bool, P>
isMultiple(vecType<T, P>
const & Value, T Multiple);
100 template <
typename T, precision P,
template <
typename, precision>
class vecType>
101 GLM_FUNC_DECL vecType<bool, P>
isMultiple(vecType<T, P>
const & Value, vecType<T, P>
const & Multiple);
110 template <
typename genType>
111 GLM_FUNC_DECL genType
ceilMultiple(genType Source, genType Multiple);
120 template <
typename T, precision P,
template <
typename, precision>
class vecType>
121 GLM_FUNC_DECL vecType<T, P>
ceilMultiple(vecType<T, P>
const & Source, vecType<T, P>
const & Multiple);
130 template <
typename genType>
142 template <
typename T, precision P,
template <
typename, precision>
class vecType>
144 vecType<T, P>
const & Source,
145 vecType<T, P>
const & Multiple);
154 template <
typename genType>
166 template <
typename T, precision P,
template <
typename, precision>
class vecType>
168 vecType<T, P>
const & Source,
169 vecType<T, P>
const & Multiple);
GLM_FUNC_DECL vecType< bool, P > isPowerOfTwo(vecType< T, P > const &value)
Return true if the value is a power of two number.
GLM_FUNC_DECL vecType< bool, P > isMultiple(vecType< T, P > const &Value, vecType< T, P > const &Multiple)
Return true if the 'Value' is a multiple of 'Multiple'.
GLM_FUNC_DECL vecType< T, P > ceilMultiple(vecType< T, P > const &Source, vecType< T, P > const &Multiple)
Higher multiple number of Source.
GLM_FUNC_DECL vecType< T, P > roundPowerOfTwo(vecType< T, P > const &value)
Return the power of two number which value is the closet to the input value.
GLM_FUNC_DECL vecType< T, P > roundMultiple(vecType< T, P > const &Source, vecType< T, P > const &Multiple)
Lower multiple number of Source.
GLM_FUNC_DECL vecType< T, P > floorPowerOfTwo(vecType< 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...
GLM_FUNC_DECL vecType< T, P > ceilPowerOfTwo(vecType< 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 vecType< T, P > floorMultiple(vecType< T, P > const &Source, vecType< T, P > const &Multiple)
Lower multiple number of Source.