file
Packing.hFunctions Magnum::
Namespaces
- namespace Magnum
- Root namespace.
- namespace Magnum::Math
- Math library.
Packing and unpacking functions
Similarly to scalar/vector functions these work on both scalars and vectors, including Deg and Rad.
-
template<class FloatingPoint, class Integral>auto unpack(const Integral& value) -> FloatingPoint
- Unpack integral value into a floating-point representation.
-
template<class FloatingPoint, class Integral, UnsignedInt bits>auto unpack(const Integral& value) -> FloatingPoint
- Unpack integer bits into a floating-point representation.
-
template<class Integral, class FloatingPoint>auto pack(const FloatingPoint& value) -> Integral
- Pack floating-point value into an integer representation.
-
template<class Integral, UnsignedInt bits, class FloatingPoint>auto pack(FloatingPoint value) -> Integral
- Pack floating-point value into integer bits.
- auto packHalf(Float value) -> UnsignedShort
- Pack 32-bit float value into 16-bit half-float representation.
-
template<std::auto packHalf(const Vector<size, Float>& value) -> Vector<size, UnsignedShort>
size_t size> - auto unpackHalf(UnsignedShort value) -> Float
- Unpack 16-bit half-float value into 32-bit float representation.
-
template<std::auto unpackHalf(const Vector<size, UnsignedShort>& value) -> Vector<size, Float>
size_t size>