0.9.8 API documenation
bit.hpp
Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependencies
16 #include "../gtc/bitfield.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_bit is an experimetal extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_bit extension is deprecated, include GLM_GTC_bitfield and GLM_GTC_integer instead")
24 #endif
25 
26 namespace glm
27 {
30 
32  template <typename genIUType>
33  GLM_FUNC_DECL genIUType highestBitValue(genIUType Value);
34 
36  template <typename genIUType>
37  GLM_FUNC_DECL genIUType lowestBitValue(genIUType Value);
38 
42  template <typename T, precision P, template <typename, precision> class vecType>
43  GLM_FUNC_DECL vecType<T, P> highestBitValue(vecType<T, P> const & value);
44 
50  template <typename genIUType>
51  GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoAbove(genIUType Value);
52 
58  template <typename T, precision P, template <typename, precision> class vecType>
59  GLM_DEPRECATED GLM_FUNC_DECL vecType<T, P> powerOfTwoAbove(vecType<T, P> const & value);
60 
66  template <typename genIUType>
67  GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoBelow(genIUType Value);
68 
74  template <typename T, precision P, template <typename, precision> class vecType>
75  GLM_DEPRECATED GLM_FUNC_DECL vecType<T, P> powerOfTwoBelow(vecType<T, P> const & value);
76 
82  template <typename genIUType>
83  GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoNearest(genIUType Value);
84 
90  template <typename T, precision P, template <typename, precision> class vecType>
91  GLM_DEPRECATED GLM_FUNC_DECL vecType<T, P> powerOfTwoNearest(vecType<T, P> const & value);
92 
94 } //namespace glm
95 
96 
97 #include "bit.inl"
98 
GLM_DEPRECATED GLM_FUNC_DECL vecType< T, P > powerOfTwoBelow(vecType< T, P > const &value)
Return the power of two number which value is just lower the input value.
GLM_DEPRECATED GLM_FUNC_DECL vecType< T, P > powerOfTwoAbove(vecType< T, P > const &value)
Return the power of two number which value is just higher the input value.
GLM_FUNC_DECL genIUType lowestBitValue(genIUType Value)
GLM_FUNC_DECL vecType< T, P > highestBitValue(vecType< T, P > const &value)
Find the highest bit set to 1 in a integer variable and return its value.
Definition: _noise.hpp:11
GLM_DEPRECATED GLM_FUNC_DECL vecType< T, P > powerOfTwoNearest(vecType< T, P > const &value)
Return the power of two number which value is the closet to the input value.