# glm::gtx::bit Namespace Reference

GLM_GTX_bit extension: Allow to perform bit operations on integer values. More...

## Functions
template<typename genType >
genType | bitRevert (genType const &value)
| Revert all bits of any integer based type.
template<typename genType >
genType | bitRotateLeft (genType const &In, std::size_t Shift)
| Rotate all bits to the left.
template<typename genType >
genType | bitRotateRight (genType const &In, std::size_t Shift)
| Rotate all bits to the right.
template<typename genType , typename genIType >
genIType | extractField (genType const &v, genIType const &first, genIType const &count)
| Component wise extraction of bit fields.
template<typename genType >
int | highestBit (genType const &value)
| Find the highest bit set to 1 in a integer variable.
template<typename genType >
genType | highestBitValue (genType const &value)
| Find the highest bit set to 1 in a integer variable and return its value.
template<typename genType >
bool | isPowerOfTwo (genType const &value)
| Return true if the value is a power of two number.
template<typename genType >
int | lowestBit (genType const &value)
| Find the lowest bit set to 1 in a integer variable.
template<typename genIType >
genIType | mask (genIType const &count)
| Build a mask of 'count' bits From GLM_GTX_bit extension.
template<typename genType >
genType | powerOfTwoAbove (genType const &value)
| Return the power of two number which value is just higher the input value.
template<typename genType >
genType | powerOfTwoBelow (genType const &value)
| Return the power of two number which value is just lower the input value.
template<typename genType >
genType | powerOfTwoNearest (genType const &value)
| Return the power of two number which value is the closet to the input value.

## Detailed Description

GLM_GTX_bit extension: Allow to perform bit operations on integer values.

## Function Documentation

genType glm::gtx::bit::bitRevert | ( | genType const & | value | ) |

Revert all bits of any integer based type.

From GLM_GTX_bit extension.

genType glm::gtx::bit::bitRotateLeft | ( | genType const & | In,
|  | std::size_t | Shift |
| ) |  |  |

Rotate all bits to the left.

From GLM_GTX_bit extension.

genType glm::gtx::bit::bitRotateRight | ( | genType const & | In,
|  | std::size_t | Shift |
| ) |  |  |

Rotate all bits to the right.

From GLM_GTX_bit extension.

genIType glm::gtx::bit::extractField | ( | genType const & | v,
|  | genIType const & | first,
|  | genIType const & | count |
| ) |  |  |

Component wise extraction of bit fields.

genType and genIType could be a scalar or a vector. From GLM_GTX_bit extension.

int glm::gtx::bit::highestBit | ( | genType const & | value | ) |

Find the highest bit set to 1 in a integer variable.

From GLM_GTX_bit extension.

genType glm::gtx::bit::highestBitValue | ( | genType const & | value | ) |

Find the highest bit set to 1 in a integer variable and return its value.

From GLM_GTX_bit extension.

bool glm::gtx::bit::isPowerOfTwo | ( | genType const & | value | ) |

Return true if the value is a power of two number.

From GLM_GTX_bit extension.

int glm::gtx::bit::lowestBit | ( | genType const & | value | ) |

Find the lowest bit set to 1 in a integer variable.

From GLM_GTX_bit extension.

genIType glm::gtx::bit::mask | ( | genIType const & | count | ) |

Build a mask of 'count' bits From GLM_GTX_bit extension.

genType glm::gtx::bit::powerOfTwoAbove | ( | genType const & | value | ) |

Return the power of two number which value is just higher the input value.

From GLM_GTX_bit extension.

genType glm::gtx::bit::powerOfTwoBelow | ( | genType const & | value | ) |

Return the power of two number which value is just lower the input value.

From GLM_GTX_bit extension.

genType glm::gtx::bit::powerOfTwoNearest | ( | genType const & | value | ) |

Return the power of two number which value is the closet to the input value.

From GLM_GTX_bit extension.