Browse Source

Math: removed long-deprecated member dot(), angle(), lerp(), cross().

Use free functions in Math namespace instead.
pull/231/head
Vladimír Vondruš 8 years ago
parent
commit
468af3284a
  1. 20
      src/Magnum/Math/Complex.h
  2. 38
      src/Magnum/Math/Quaternion.h
  3. 24
      src/Magnum/Math/Vector.h
  4. 11
      src/Magnum/Math/Vector2.h
  5. 11
      src/Magnum/Math/Vector3.h

20
src/Magnum/Math/Complex.h

@ -88,26 +88,6 @@ template<class T> class Complex {
public:
typedef T Type; /**< @brief Underlying data type */
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @brief @copybrief Math::dot(const Complex<T>&, const Complex<T>&)
* @deprecated Use @ref Math::dot(const Complex<T>&, const Complex<T>&)
* instead.
*/
CORRADE_DEPRECATED("use Math::dot() instead") static T dot(const Complex<T>& a, const Complex<T>& b) {
return Math::dot(a, b);
}
/**
* @brief @copybrief Math::angle(const Complex<T>&, const Complex<T>&)
* @deprecated Use @ref Math::angle(const Complex<T>&, const Complex<T>&)
* instead.
*/
CORRADE_DEPRECATED("use Math::angle() instead") static Rad<T> angle(const Complex<T>& normalizedA, const Complex<T>& normalizedB) {
return Math::angle(normalizedA, normalizedB);
}
#endif
/**
* @brief Rotation complex number
* @param angle Rotation angle (counterclockwise)

38
src/Magnum/Math/Quaternion.h

@ -136,44 +136,6 @@ template<class T> class Quaternion {
public:
typedef T Type; /**< @brief Underlying data type */
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @brief @copybrief Math::dot(const Quaternion<T>&, const Quaternion<T>&)
* @deprecated Use @ref Math::dot(const Quaternion<T>&, const Quaternion<T>&)
* instead.
*/
CORRADE_DEPRECATED("use Math::dot() instead") static T dot(const Quaternion<T>& a, const Quaternion<T>& b) {
return Math::dot(a, b);
}
/**
* @brief @copybrief Math::angle(const Quaternion<T>&, const Quaternion<T>&)
* @deprecated Use @ref Math::angle(const Quaternion<T>&, const Quaternion<T>&)
* instead.
*/
CORRADE_DEPRECATED("use Math::angle() instead") static Rad<T> angle(const Quaternion<T>& normalizedA, const Quaternion<T>& normalizedB) {
return Math::angle(normalizedA, normalizedB);
}
/**
* @brief @copybrief Math::lerp(const Quaternion<T>&, const Quaternion<T>&, T)
* @deprecated Use @ref Math::lerp(const Quaternion<T>&, const Quaternion<T>&, T)
* instead.
*/
CORRADE_DEPRECATED("use Math::lerp() instead") static Quaternion<T> lerp(const Quaternion<T>& normalizedA, const Quaternion<T>& normalizedB, T t) {
return Math::lerp(normalizedA, normalizedB, t);
}
/**
* @brief @copybrief Math::slerp(const Quaternion<T>&, const Quaternion<T>&, T)
* @deprecated Use @ref Math::slerp(const Quaternion<T>&, const Quaternion<T>&, T)
* instead.
*/
CORRADE_DEPRECATED("use Math::slerp() instead") static Quaternion<T> slerp(const Quaternion<T>& normalizedA, const Quaternion<T>& normalizedB, T t) {
return Math::slerp(normalizedA, normalizedB, t);
}
#endif
/**
* @brief Rotation quaternion
* @param angle Rotation angle (counterclockwise)

24
src/Magnum/Math/Vector.h

@ -42,10 +42,6 @@
#include "Magnum/Math/BoolVector.h"
#include "Magnum/Math/TypeTraits.h"
#ifdef MAGNUM_BUILD_DEPRECATED
#include <Corrade/Utility/Macros.h>
#endif
namespace Magnum { namespace Math {
namespace Implementation {
@ -148,26 +144,6 @@ template<std::size_t size, class T> class Vector {
return padInternal<otherSize>(typename Implementation::GenerateSequence<size>::Type(), a, value);
}
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @brief @copybrief Magnum::Math::dot(const Vector<size, T>&, const Vector<size, T>&)
* @deprecated Use @ref Math::dot(const Vector<size, T>&, const Vector<size, T>&)
* instead.
*/
CORRADE_DEPRECATED("use Math::dot() instead") static T dot(const Vector<size, T>& a, const Vector<size, T>& b) {
return Math::dot(a, b);
}
/**
* @brief @copybrief Magnum::Math::angle(const Vector<size, T>&, const Vector<size, T>&)
* @deprecated Use @ref Math::angle(const Vector<size, T>&, const Vector<size, T>&)
* instead.
*/
CORRADE_DEPRECATED("use Math::angle() instead") static Rad<T> angle(const Vector<size, T>& normalizedA, const Vector<size, T>& normalizedB) {
return Math::angle(normalizedA, normalizedB);
}
#endif
/**
* @brief Default constructor
*

11
src/Magnum/Math/Vector2.h

@ -104,17 +104,6 @@ template<class T> class Vector2: public Vector<2, T> {
*/
constexpr static Vector2<T> yScale(T scale) { return {T(1), scale}; }
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @brief @copybrief Math::cross(const Vector2<T>&, const Vector2<T>&)
* @deprecated Use @ref Math::cross(const Vector2<T>&, const Vector2<T>&)
* instead.
*/
CORRADE_DEPRECATED("use Math::cross() instead") static T cross(const Vector2<T>& a, const Vector2<T>& b) {
return Math::cross(a, b);
}
#endif
/** @copydoc Vector::Vector(ZeroInitT) */
constexpr /*implicit*/ Vector2(ZeroInitT = ZeroInit) noexcept
/** @todoc remove workaround when doxygen is sane */

11
src/Magnum/Math/Vector3.h

@ -126,17 +126,6 @@ template<class T> class Vector3: public Vector<3, T> {
*/
constexpr static Vector3<T> zScale(T scale) { return {T(1), T(1), scale}; }
#ifdef MAGNUM_BUILD_DEPRECATED
/**
* @brief @copybrief Math::cross(const Vector3<T>&, const Vector3<T>&)
* @deprecated Use @ref Math::cross(const Vector3<T>&, const Vector3<T>&)
* instead.
*/
CORRADE_DEPRECATED("use Math::cross() instead") static Vector3<T> cross(const Vector3<T>& a, const Vector3<T>& b) {
return Math::cross(a, b);
}
#endif
/** @copydoc Vector::Vector(ZeroInitT) */
constexpr /*implicit*/ Vector3(ZeroInitT = ZeroInit) noexcept
/** @todoc remove workaround when doxygen is sane */

Loading…
Cancel
Save