42 #include "../detail/setup.hpp"
43 #include "../detail/precision.hpp"
44 #include "../detail/_vectorize.hpp"
45 #include "../vector_relational.hpp"
46 #include "../common.hpp"
49 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
50 # pragma message("GLM: GLM_GTC_integer extension included")
61 template <
typename genIUType>
67 template <
typename T, precision P,
template <
typename, precision>
class vecType>
68 GLM_FUNC_DECL vecType<bool, P>
isPowerOfTwo(vecType<T, P>
const & value);
74 template <
typename genIUType>
81 template <
typename T, precision P,
template <
typename, precision>
class vecType>
82 GLM_FUNC_DECL vecType<T, P>
ceilPowerOfTwo(vecType<T, P>
const & value);
88 template <
typename genIUType>
95 template <
typename T, precision P,
template <
typename, precision>
class vecType>
96 GLM_FUNC_DECL vecType<T, P>
floorPowerOfTwo(vecType<T, P>
const & value);
101 template <
typename genIUType>
107 template <
typename T, precision P,
template <
typename, precision>
class vecType>
108 GLM_FUNC_DECL vecType<T, P>
roundPowerOfTwo(vecType<T, P>
const & value);
113 template <
typename genIUType>
114 GLM_FUNC_DECL
bool isMultiple(genIUType Value, genIUType Multiple);
119 template <
typename T, precision P,
template <
typename, precision>
class vecType>
120 GLM_FUNC_DECL vecType<bool, P>
isMultiple(vecType<T, P>
const & Value, T Multiple);
125 template <
typename T, precision P,
template <
typename, precision>
class vecType>
126 GLM_FUNC_DECL vecType<bool, P>
isMultiple(vecType<T, P>
const & Value, vecType<T, P>
const & Multiple);
135 template <
typename genType>
136 GLM_FUNC_DECL genType
ceilMultiple(genType Source, genType Multiple);
145 template <
typename T, precision P,
template <
typename, precision>
class vecType>
146 GLM_FUNC_DECL vecType<T, P>
ceilMultiple(vecType<T, P>
const & Source, vecType<T, P>
const & Multiple);
155 template <
typename genType>
167 template <
typename T, precision P,
template <
typename, precision>
class vecType>
169 vecType<T, P>
const & Source,
170 vecType<T, P>
const & Multiple);
179 template <
typename genType>
191 template <
typename T, precision P,
template <
typename, precision>
class vecType>
193 vecType<T, P>
const & Source,
194 vecType<T, P>
const & Multiple);
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.
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.