Browse Source

Math: removed deprecated (and confusing) normalize() / denormalize().

Deprecated since dd2058cee3 (December
2016), use more clearly named Math::pack() and unpack() instead.
simd
Vladimír Vondruš 8 years ago
parent
commit
5c5ecb5ff8
  1. 3
      doc/changelog.dox
  2. 7
      src/Magnum/Math/Functions.h
  3. 18
      src/Magnum/Math/Packing.h

3
doc/changelog.dox

@ -173,6 +173,9 @@ See also:
- Removed availability of @ref Math::Color3 and @ref Math::Color4 literals in
the root namespace, deprecated since April 2016. Explicitly call
@cpp using namespace Math::Literals; @ce instead.
- Removed @cpp Math::normalize() @ce and @cpp Math::denormalize() @ce
functions, deprecated since December 2016. Use @ref Math::pack() and
@ref Math::unpack() instead.
@section changelog-2018-10 2018.10

7
src/Magnum/Math/Functions.h

@ -712,11 +712,4 @@ template<std::size_t size, class T> inline Vector<size, T> fma(const Vector<size
}}
#ifdef MAGNUM_BUILD_DEPRECATED
/* In order to make the deprecated normalize() / denormalize() functions
available in the original header. The Packing.h header depends on this file
so it needs to be included after it. */
#include "Magnum/Math/Packing.h"
#endif
#endif

18
src/Magnum/Math/Packing.h

@ -121,15 +121,6 @@ template<class FloatingPoint, UnsignedInt bits, std::size_t size, class Integral
}
#endif
#ifdef MAGNUM_BUILD_DEPRECATED
/** @brief @copybrief unpack()
* @deprecated Use @ref unpack() instead.
*/
template<class FloatingPoint, class Integral> CORRADE_DEPRECATED("use unpack() instead") inline FloatingPoint normalize(const Integral& value) {
return unpack<FloatingPoint, Integral>(value);
}
#endif
/**
@brief Pack floating-point value into an integer representation
@ -189,15 +180,6 @@ template<class Integral, UnsignedInt bits, std::size_t size, class FloatingPoint
}
#endif
#ifdef MAGNUM_BUILD_DEPRECATED
/** @brief @copybrief pack()
* @deprecated Use @ref pack() instead.
*/
template<class Integral, class FloatingPoint> CORRADE_DEPRECATED("use pack() instead") inline Integral denormalize(const FloatingPoint& value) {
return pack<Integral, FloatingPoint>(value);
}
#endif
/**
@brief Pack 32-bit float value into 16-bit half-float representation

Loading…
Cancel
Save