0.9.6
bit.hpp
Go to the documentation of this file.
1 
43 #pragma once
44 
45 // Dependencies
46 #include "../gtc/bitfield.hpp"
47 
48 #if(defined(GLM_MESSAGES))
49 # pragma message("GLM: GLM_GTX_bit extension is deprecated, include GLM_GTC_bitfield and GLM_GTC_integer instead")
50 #endif
51 
52 namespace glm
53 {
56 
58  template <typename genIUType>
59  GLM_FUNC_DECL genIUType highestBitValue(genIUType Value);
60 
64  template <typename T, precision P, template <typename, precision> class vecType>
65  GLM_FUNC_DECL vecType<T, P> highestBitValue(vecType<T, P> const & value);
66 
72  template <typename genIUType>
73  GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoAbove(genIUType Value);
74 
80  template <typename T, precision P, template <typename, precision> class vecType>
81  GLM_DEPRECATED GLM_FUNC_DECL vecType<T, P> powerOfTwoAbove(vecType<T, P> const & value);
82 
88  template <typename genIUType>
89  GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoBelow(genIUType Value);
90 
96  template <typename T, precision P, template <typename, precision> class vecType>
97  GLM_DEPRECATED GLM_FUNC_DECL vecType<T, P> powerOfTwoBelow(vecType<T, P> const & value);
98 
104  template <typename genIUType>
105  GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoNearest(genIUType Value);
106 
112  template <typename T, precision P, template <typename, precision> class vecType>
113  GLM_DEPRECATED GLM_FUNC_DECL vecType<T, P> powerOfTwoNearest(vecType<T, P> const & value);
114 
116 } //namespace glm
117 
118 
119 #include "bit.inl"
120 
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.
Definition: _noise.hpp:39
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.
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_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.