| 0.9.8

- Main Page
- Modules
- Files

- File List

bit.hpp
Go to the documentation of this file.
1
14 #pragma once
15
16 // Dependencies
17 #include "../gtc/bitfield.hpp"
18
19 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
20 # pragma message("GLM: GLM_GTX_bit extension is deprecated, include GLM_GTC_bitfield and GLM_GTC_integer instead")
21 #endif
22
23 namespace glm
24 {
27
29 template <typename genIUType>
30 GLM_FUNC_DECL genIUType highestBitValue(genIUType Value);
31
33 template <typename genIUType>
34 GLM_FUNC_DECL genIUType lowestBitValue(genIUType Value);
35
39 template <typename T, precision P, template <typename, precision> class vecType>
40 GLM_FUNC_DECL vecType<T, P> highestBitValue(vecType<T, P> const & value);
41
47 template <typename genIUType>
48 GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoAbove(genIUType Value);
49
55 template <typename T, precision P, template <typename, precision> class vecType>
56 GLM_DEPRECATED GLM_FUNC_DECL vecType<T, P> powerOfTwoAbove(vecType<T, P> const & value);
57
63 template <typename genIUType>
64 GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoBelow(genIUType Value);
65
71 template <typename T, precision P, template <typename, precision> class vecType>
72 GLM_DEPRECATED GLM_FUNC_DECL vecType<T, P> powerOfTwoBelow(vecType<T, P> const & value);
73
79 template <typename genIUType>
80 GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoNearest(genIUType Value);
81
87 template <typename T, precision P, template <typename, precision> class vecType>
88 GLM_DEPRECATED GLM_FUNC_DECL vecType<T, P> powerOfTwoNearest(vecType<T, P> const & value);
89
91 } //namespace glm
92
93
94 #include "bit.inl"
95
glm::powerOfTwoBelow
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::powerOfTwoAbove
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
Definition: _noise.hpp:11
glm::lowestBitValue
GLM_FUNC_DECL genIUType lowestBitValue(genIUType Value)
glm::highestBitValue
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::powerOfTwoNearest
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.