0.9.9 API documentation
Loading...
Searching...
No Matches
integer.hpp
Go to the documentation of this file.
1
13
14#pragma once
15
16// Dependencies
17#include "../detail/setup.hpp"
18#include "../detail/qualifier.hpp"
19#include "../common.hpp"
20#include "../integer.hpp"
21#include "../exponential.hpp"
22#include <limits>
23
24#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
25# pragma message("GLM: GLM_GTC_integer extension included")
26#endif
27
28namespace glm
29{
32
35 template<typename genIUType>
36 GLM_FUNC_DECL genIUType log2(genIUType x);
37
47 template<length_t L, typename T, qualifier Q>
48 GLM_FUNC_DECL vec<L, int, Q> iround(vec<L, T, Q> const& x);
49
59 template<length_t L, typename T, qualifier Q>
60 GLM_FUNC_DECL vec<L, uint, Q> uround(vec<L, T, Q> const& x);
61
63} //namespace glm
64
65#include "integer.inl"
Core features
Core features
GLM_FUNC_DECL vec< L, T, Q > log2(vec< L, T, Q > const &v)
Returns the base 2 log of x, i.e., returns the value y, which satisfies the equation x = 2 ^ y.
GLM_FUNC_DECL vec< L, uint, Q > uround(vec< L, T, Q > const &x)
Returns a value equal to the nearest integer to x.
GLM_FUNC_DECL vec< L, int, Q > iround(vec< L, T, Q > const &x)
Returns a value equal to the nearest integer to x.
Core features