gtx/integer.hpp
Go to the documentation of this file.
#pragma once
// Dependency:
#include "../glm.hpp"
#include "../gtc/integer.hpp"
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# ifndef GLM_ENABLE_EXPERIMENTAL
# pragma message("GLM: GLM_GTX_integer is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it.")
# else
# pragma message("GLM: GLM_GTX_integer extension included")
# endif
#endif
namespace glm
{
GLM_FUNC_DECL int pow(int x, uint y);
GLM_FUNC_DECL int sqrt(int x);
GLM_FUNC_DECL unsigned int floor_log2(unsigned int x);
GLM_FUNC_DECL int mod(int x, int y);
template<typename genType>
GLM_FUNC_DECL genType factorial(genType const& x);
typedef signed int sint;
GLM_FUNC_DECL uint pow(uint x, uint y);
GLM_FUNC_DECL uint sqrt(uint x);
GLM_FUNC_DECL uint mod(uint x, uint y);
GLM_FUNC_DECL uint nlz(uint x);
}//namespace glm
#include "integer.inl"
glm::nlz
GLM_FUNC_DECL uint nlz(uint x)
Returns the number of leading zeros.
glm::mod
GLM_FUNC_DECL uint mod(uint x, uint y)
Modulus.
glm::floor_log2
GLM_FUNC_DECL unsigned int floor_log2(unsigned int x)
Returns the floor log2 of x.
glm::sint
signed int sint
32bit signed integer.
Definition: gtx/integer.hpp:55
glm::factorial
GLM_FUNC_DECL genType factorial(genType const &x)
Return the factorial value of a number (!12 max, integer only) From GLM_GTX_integer extension...
glm::pow
GLM_FUNC_DECL uint pow(uint x, uint y)
Returns x raised to the y power.
glm::sqrt
GLM_FUNC_DECL uint sqrt(uint x)
Returns the positive square root of x.
glm
Definition: common.hpp:20