1.0.0 API documentation
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 experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #elif GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
21 # pragma message("GLM: GLM_GTX_bit extension included")
22 #endif
23 
24 namespace glm
25 {
28 
30  template<typename genIUType>
31  GLM_FUNC_DECL genIUType highestBitValue(genIUType Value);
32 
34  template<typename genIUType>
35  GLM_FUNC_DECL genIUType lowestBitValue(genIUType Value);
36 
40  template<length_t L, typename T, qualifier Q>
41  GLM_FUNC_DECL vec<L, T, Q> highestBitValue(vec<L, T, Q> const& value);
42 
48  template<typename genIUType>
49  GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoAbove(genIUType Value);
50 
56  template<length_t L, typename T, qualifier Q>
57  GLM_DEPRECATED GLM_FUNC_DECL vec<L, T, Q> powerOfTwoAbove(vec<L, T, Q> const& value);
58 
64  template<typename genIUType>
65  GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoBelow(genIUType Value);
66 
72  template<length_t L, typename T, qualifier Q>
73  GLM_DEPRECATED GLM_FUNC_DECL vec<L, T, Q> powerOfTwoBelow(vec<L, T, Q> const& value);
74 
80  template<typename genIUType>
81  GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoNearest(genIUType Value);
82 
88  template<length_t L, typename T, qualifier Q>
89  GLM_DEPRECATED GLM_FUNC_DECL vec<L, T, Q> powerOfTwoNearest(vec<L, T, Q> const& value);
90 
92 } //namespace glm
93 
94 
95 #include "bit.inl"
96 
glm::powerOfTwoNearest
GLM_DEPRECATED GLM_FUNC_DECL vec< L, T, Q > powerOfTwoNearest(vec< L, T, Q > const &value)
Return the power of two number which value is the closet to the input value.
glm::highestBitValue
GLM_FUNC_DECL vec< L, T, Q > highestBitValue(vec< L, T, Q > const &value)
Find the highest bit set to 1 in a integer variable and return its value.
glm::lowestBitValue
GLM_FUNC_DECL genIUType lowestBitValue(genIUType Value)
glm::powerOfTwoAbove
GLM_DEPRECATED GLM_FUNC_DECL vec< L, T, Q > powerOfTwoAbove(vec< L, T, Q > const &value)
Return the power of two number which value is just higher the input value.
glm::powerOfTwoBelow
GLM_DEPRECATED GLM_FUNC_DECL vec< L, T, Q > powerOfTwoBelow(vec< L, T, Q > const &value)
Return the power of two number which value is just lower the input value.