gtx/integer.hpp
Go to the documentation of this file.
#pragma once
// Dependency:
#include "../glm.hpp"
#include "../gtc/integer.hpp"
#ifndef GLM_ENABLE_EXPERIMENTAL
# error "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."
#elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_GTX_integer extension included")
#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::sint
signed int sint
32bit signed integer.
Definition: gtx/integer.hpp:53
glm::mod
GLM_FUNC_DECL uint mod(uint x, uint y)
Modulus.
glm::sqrt
GLM_FUNC_DECL uint sqrt(uint x)
Returns the positive square root of x.
glm::nlz
GLM_FUNC_DECL uint nlz(uint x)
Returns the number of leading zeros.
glm::pow
GLM_FUNC_DECL uint pow(uint x, uint y)
Returns x raised to the y power.
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::floor_log2
GLM_FUNC_DECL unsigned int floor_log2(unsigned int x)
Returns the floor log2 of x.