46 #include "../detail/setup.hpp"
47 #include "../detail/precision.hpp"
48 #include "../detail/_vectorize.hpp"
49 #include "../vector_relational.hpp"
50 #include "../common.hpp"
53 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
54 # pragma message("GLM: GLM_GTC_integer extension included")
65 template <
typename genIUType>
71 template <
typename T, precision P,
template <
typename, precision>
class vecType>
72 GLM_FUNC_DECL vecType<bool, P>
isPowerOfTwo(vecType<T, P>
const & value);
78 template <
typename genIUType>
85 template <
typename T, precision P,
template <
typename, precision>
class vecType>
86 GLM_FUNC_DECL vecType<T, P>
ceilPowerOfTwo(vecType<T, P>
const & value);
92 template <
typename genIUType>
99 template <
typename T, precision P,
template <
typename, precision>
class vecType>
100 GLM_FUNC_DECL vecType<T, P>
floorPowerOfTwo(vecType<T, P>
const & value);
105 template <
typename genIUType>
111 template <
typename T, precision P,
template <
typename, precision>
class vecType>
112 GLM_FUNC_DECL vecType<T, P>
roundPowerOfTwo(vecType<T, P>
const & value);
117 template <
typename genIUType>
118 GLM_FUNC_DECL
bool isMultiple(genIUType Value, genIUType Multiple);
123 template <
typename T, precision P,
template <
typename, precision>
class vecType>
124 GLM_FUNC_DECL vecType<bool, P>
isMultiple(vecType<T, P>
const & Value, T Multiple);
129 template <
typename T, precision P,
template <
typename, precision>
class vecType>
130 GLM_FUNC_DECL vecType<bool, P>
isMultiple(vecType<T, P>
const & Value, vecType<T, P>
const & Multiple);
139 template <
typename genType>
140 GLM_FUNC_DECL genType
ceilMultiple(genType Source, genType Multiple);
149 template <
typename T, precision P,
template <
typename, precision>
class vecType>
150 GLM_FUNC_DECL vecType<T, P>
ceilMultiple(vecType<T, P>
const & Source, vecType<T, P>
const & Multiple);
159 template <
typename genType>
171 template <
typename T, precision P,
template <
typename, precision>
class vecType>
173 vecType<T, P>
const & Source,
174 vecType<T, P>
const & Multiple);
183 template <
typename genType>
195 template <
typename T, precision P,
template <
typename, precision>
class vecType>
197 vecType<T, P>
const & Source,
198 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< 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 > 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 > ceilMultiple(vecType< T, P > const &Source, vecType< T, P > const &Multiple)
Higher multiple number of Source.
GLM_FUNC_DECL vecType< T, P > floorMultiple(vecType< T, P > const &Source, vecType< T, P > const &Multiple)
Lower multiple number of Source.
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< bool, P > isMultiple(vecType< T, P > const &Value, vecType< T, P > const &Multiple)
Return true if the 'Value' is a multiple of 'Multiple'.