scalar_integer.hpp
Go to the documentation of this file.
#pragma once
// Dependencies
#include "../detail/setup.hpp"
#include "../detail/qualifier.hpp"
#include "../detail/_vectorize.hpp"
#include "../detail/type_float.hpp"
#include "../vector_relational.hpp"
#include "../common.hpp"
#include <limits>
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_EXT_scalar_integer extension included")
#endif
namespace glm
{
template<typename genIUType>
GLM_FUNC_DECL bool isPowerOfTwo(genIUType v);
template<typename genIUType>
GLM_FUNC_DECL genIUType nextPowerOfTwo(genIUType v);
template<typename genIUType>
GLM_FUNC_DECL genIUType prevPowerOfTwo(genIUType v);
template<typename genIUType>
GLM_FUNC_DECL bool isMultiple(genIUType v, genIUType Multiple);
template<typename genIUType>
GLM_FUNC_DECL genIUType nextMultiple(genIUType v, genIUType Multiple);
template<typename genIUType>
GLM_FUNC_DECL genIUType prevMultiple(genIUType v, genIUType Multiple);
template<typename genIUType>
GLM_FUNC_DECL int findNSB(genIUType x, int significantBitCount);
} //namespace glm
#include "scalar_integer.inl"
glm::prevPowerOfTwo
GLM_FUNC_DECL genIUType prevPowerOfTwo(genIUType 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 int findNSB(genIUType x, int significantBitCount)
Returns the bit number of the Nth significant bit set to 1 in the binary representation of value.
glm::isPowerOfTwo
GLM_FUNC_DECL bool isPowerOfTwo(genIUType v)
Return true if the value is a power of two number.
glm::nextPowerOfTwo
GLM_FUNC_DECL genIUType nextPowerOfTwo(genIUType v)
Return the power of two number which value is just higher the input value, round up to a power of two...
glm::isMultiple
GLM_FUNC_DECL bool isMultiple(genIUType v, genIUType Multiple)
Return true if the 'Value' is a multiple of 'Multiple'.
glm::nextMultiple
GLM_FUNC_DECL genIUType nextMultiple(genIUType v, genIUType Multiple)
Higher multiple number of Source.
glm::prevMultiple
GLM_FUNC_DECL genIUType prevMultiple(genIUType v, genIUType Multiple)
Lower multiple number of Source.