round.hpp
Go to the documentation of this file.
#pragma once
// Dependencies
#include "../detail/setup.hpp"
#include "../detail/qualifier.hpp"
#include "../detail/_vectorize.hpp"
#include "../vector_relational.hpp"
#include "../common.hpp"
#include <limits>
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_GTC_round extension included")
#endif
namespace glm
{
template<typename genIUType>
GLM_FUNC_DECL genIUType ceilPowerOfTwo(genIUType v);
template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, T, Q> ceilPowerOfTwo(vec<L, T, Q> const& v);
template<typename genIUType>
GLM_FUNC_DECL genIUType floorPowerOfTwo(genIUType v);
template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, T, Q> floorPowerOfTwo(vec<L, T, Q> const& v);
template<typename genIUType>
GLM_FUNC_DECL genIUType roundPowerOfTwo(genIUType v);
template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, T, Q> roundPowerOfTwo(vec<L, T, Q> const& v);
template<typename genType>
GLM_FUNC_DECL genType ceilMultiple(genType v, genType Multiple);
template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, T, Q> ceilMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
template<typename genType>
GLM_FUNC_DECL genType floorMultiple(genType v, genType Multiple);
template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, T, Q> floorMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
template<typename genType>
GLM_FUNC_DECL genType roundMultiple(genType v, genType Multiple);
template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, T, Q> roundMultiple(vec<L, T, Q> const& v, vec<L, T, Q> const& Multiple);
} //namespace glm
#include "round.inl"
glm::floorMultiple
GLM_FUNC_DECL vec< L, T, Q > floorMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
Lower multiple number of Source.
glm::roundMultiple
GLM_FUNC_DECL vec< L, T, Q > roundMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
Lower multiple number of Source.
glm::floorPowerOfTwo
GLM_FUNC_DECL vec< L, T, Q > floorPowerOfTwo(vec< L, T, Q > const &v)
Return the power of two number which value is just lower the input value, round down to a power of tw...
glm::ceilMultiple
GLM_FUNC_DECL vec< L, T, Q > ceilMultiple(vec< L, T, Q > const &v, vec< L, T, Q > const &Multiple)
Higher multiple number of Source.
glm::ceilPowerOfTwo
GLM_FUNC_DECL vec< L, T, Q > ceilPowerOfTwo(vec< L, T, Q > const &v)
Return the power of two number which value is just higher the input value, round up to a power of two...
glm::roundPowerOfTwo
GLM_FUNC_DECL vec< L, T, Q > roundPowerOfTwo(vec< L, T, Q > const &v)
Return the power of two number which value is the closet to the input value.