summaryrefslogtreecommitdiffstats
path: root/Project/glm/gtx/bit.hpp
diff options
context:
space:
mode:
authorThales Lima Oliveira <thaleslima.ufu@gmail.com>2020-07-08 12:05:44 -0300
committerThales Lima Oliveira <thaleslima.ufu@gmail.com>2020-07-08 12:05:44 -0300
commitcc2e40324d884bc0417809980a696a5084e661d7 (patch)
tree9620dfa32e44af5c125aac2c9bce36011ad27b8b /Project/glm/gtx/bit.hpp
parentae765504642759ba4addbf91d62f167ba5f063a3 (diff)
downloadPSP.git-cc2e40324d884bc0417809980a696a5084e661d7.tar.gz
PSP.git-cc2e40324d884bc0417809980a696a5084e661d7.tar.xz
PSP.git-cc2e40324d884bc0417809980a696a5084e661d7.zip
GLM folder changed
Diffstat (limited to 'Project/glm/gtx/bit.hpp')
-rw-r--r--Project/glm/gtx/bit.hpp98
1 files changed, 98 insertions, 0 deletions
diff --git a/Project/glm/gtx/bit.hpp b/Project/glm/gtx/bit.hpp
new file mode 100644
index 0000000..60a7aef
--- /dev/null
+++ b/Project/glm/gtx/bit.hpp
@@ -0,0 +1,98 @@
+/// @ref gtx_bit
+/// @file glm/gtx/bit.hpp
+///
+/// @see core (dependence)
+///
+/// @defgroup gtx_bit GLM_GTX_bit
+/// @ingroup gtx
+///
+/// Include <glm/gtx/bit.hpp> to use the features of this extension.
+///
+/// Allow to perform bit operations on integer values
+
+#pragma once
+
+// Dependencies
+#include "../gtc/bitfield.hpp"
+
+#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
+# ifndef GLM_ENABLE_EXPERIMENTAL
+# pragma message("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.")
+# else
+# pragma message("GLM: GLM_GTX_bit extension included")
+# endif
+#endif
+
+namespace glm
+{
+ /// @addtogroup gtx_bit
+ /// @{
+
+ /// @see gtx_bit
+ template<typename genIUType>
+ GLM_FUNC_DECL genIUType highestBitValue(genIUType Value);
+
+ /// @see gtx_bit
+ template<typename genIUType>
+ GLM_FUNC_DECL genIUType lowestBitValue(genIUType Value);
+
+ /// Find the highest bit set to 1 in a integer variable and return its value.
+ ///
+ /// @see gtx_bit
+ template<length_t L, typename T, qualifier Q>
+ GLM_FUNC_DECL vec<L, T, Q> highestBitValue(vec<L, T, Q> const& value);
+
+ /// Return the power of two number which value is just higher the input value.
+ /// Deprecated, use ceilPowerOfTwo from GTC_round instead
+ ///
+ /// @see gtc_round
+ /// @see gtx_bit
+ template<typename genIUType>
+ GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoAbove(genIUType Value);
+
+ /// Return the power of two number which value is just higher the input value.
+ /// Deprecated, use ceilPowerOfTwo from GTC_round instead
+ ///
+ /// @see gtc_round
+ /// @see gtx_bit
+ template<length_t L, typename T, qualifier Q>
+ 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 lower the input value.
+ /// Deprecated, use floorPowerOfTwo from GTC_round instead
+ ///
+ /// @see gtc_round
+ /// @see gtx_bit
+ template<typename genIUType>
+ GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoBelow(genIUType Value);
+
+ /// Return the power of two number which value is just lower the input value.
+ /// Deprecated, use floorPowerOfTwo from GTC_round instead
+ ///
+ /// @see gtc_round
+ /// @see gtx_bit
+ template<length_t L, typename T, qualifier Q>
+ 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 the closet to the input value.
+ /// Deprecated, use roundPowerOfTwo from GTC_round instead
+ ///
+ /// @see gtc_round
+ /// @see gtx_bit
+ template<typename genIUType>
+ GLM_DEPRECATED GLM_FUNC_DECL genIUType powerOfTwoNearest(genIUType Value);
+
+ /// Return the power of two number which value is the closet to the input value.
+ /// Deprecated, use roundPowerOfTwo from GTC_round instead
+ ///
+ /// @see gtc_round
+ /// @see gtx_bit
+ template<length_t L, typename T, qualifier Q>
+ GLM_DEPRECATED GLM_FUNC_DECL vec<L, T, Q> powerOfTwoNearest(vec<L, T, Q> const& value);
+
+ /// @}
+} //namespace glm
+
+
+#include "bit.inl"
+