From 468af3284a187c1de22dcebb9e9d93db00454e96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 23 Feb 2018 12:35:15 +0100 Subject: [PATCH] Math: removed long-deprecated member dot(), angle(), lerp(), cross(). Use free functions in Math namespace instead. --- src/Magnum/Math/Complex.h | 20 ------------------- src/Magnum/Math/Quaternion.h | 38 ------------------------------------ src/Magnum/Math/Vector.h | 24 ----------------------- src/Magnum/Math/Vector2.h | 11 ----------- src/Magnum/Math/Vector3.h | 11 ----------- 5 files changed, 104 deletions(-) diff --git a/src/Magnum/Math/Complex.h b/src/Magnum/Math/Complex.h index 566353b35..bffe77edd 100644 --- a/src/Magnum/Math/Complex.h +++ b/src/Magnum/Math/Complex.h @@ -88,26 +88,6 @@ template class Complex { public: typedef T Type; /**< @brief Underlying data type */ - #ifdef MAGNUM_BUILD_DEPRECATED - /** - * @brief @copybrief Math::dot(const Complex&, const Complex&) - * @deprecated Use @ref Math::dot(const Complex&, const Complex&) - * instead. - */ - CORRADE_DEPRECATED("use Math::dot() instead") static T dot(const Complex& a, const Complex& b) { - return Math::dot(a, b); - } - - /** - * @brief @copybrief Math::angle(const Complex&, const Complex&) - * @deprecated Use @ref Math::angle(const Complex&, const Complex&) - * instead. - */ - CORRADE_DEPRECATED("use Math::angle() instead") static Rad angle(const Complex& normalizedA, const Complex& normalizedB) { - return Math::angle(normalizedA, normalizedB); - } - #endif - /** * @brief Rotation complex number * @param angle Rotation angle (counterclockwise) diff --git a/src/Magnum/Math/Quaternion.h b/src/Magnum/Math/Quaternion.h index 53837452e..1627ad389 100644 --- a/src/Magnum/Math/Quaternion.h +++ b/src/Magnum/Math/Quaternion.h @@ -136,44 +136,6 @@ template class Quaternion { public: typedef T Type; /**< @brief Underlying data type */ - #ifdef MAGNUM_BUILD_DEPRECATED - /** - * @brief @copybrief Math::dot(const Quaternion&, const Quaternion&) - * @deprecated Use @ref Math::dot(const Quaternion&, const Quaternion&) - * instead. - */ - CORRADE_DEPRECATED("use Math::dot() instead") static T dot(const Quaternion& a, const Quaternion& b) { - return Math::dot(a, b); - } - - /** - * @brief @copybrief Math::angle(const Quaternion&, const Quaternion&) - * @deprecated Use @ref Math::angle(const Quaternion&, const Quaternion&) - * instead. - */ - CORRADE_DEPRECATED("use Math::angle() instead") static Rad angle(const Quaternion& normalizedA, const Quaternion& normalizedB) { - return Math::angle(normalizedA, normalizedB); - } - - /** - * @brief @copybrief Math::lerp(const Quaternion&, const Quaternion&, T) - * @deprecated Use @ref Math::lerp(const Quaternion&, const Quaternion&, T) - * instead. - */ - CORRADE_DEPRECATED("use Math::lerp() instead") static Quaternion lerp(const Quaternion& normalizedA, const Quaternion& normalizedB, T t) { - return Math::lerp(normalizedA, normalizedB, t); - } - - /** - * @brief @copybrief Math::slerp(const Quaternion&, const Quaternion&, T) - * @deprecated Use @ref Math::slerp(const Quaternion&, const Quaternion&, T) - * instead. - */ - CORRADE_DEPRECATED("use Math::slerp() instead") static Quaternion slerp(const Quaternion& normalizedA, const Quaternion& normalizedB, T t) { - return Math::slerp(normalizedA, normalizedB, t); - } - #endif - /** * @brief Rotation quaternion * @param angle Rotation angle (counterclockwise) diff --git a/src/Magnum/Math/Vector.h b/src/Magnum/Math/Vector.h index bd62bfbd1..5b351d75a 100644 --- a/src/Magnum/Math/Vector.h +++ b/src/Magnum/Math/Vector.h @@ -42,10 +42,6 @@ #include "Magnum/Math/BoolVector.h" #include "Magnum/Math/TypeTraits.h" -#ifdef MAGNUM_BUILD_DEPRECATED -#include -#endif - namespace Magnum { namespace Math { namespace Implementation { @@ -148,26 +144,6 @@ template class Vector { return padInternal(typename Implementation::GenerateSequence::Type(), a, value); } - #ifdef MAGNUM_BUILD_DEPRECATED - /** - * @brief @copybrief Magnum::Math::dot(const Vector&, const Vector&) - * @deprecated Use @ref Math::dot(const Vector&, const Vector&) - * instead. - */ - CORRADE_DEPRECATED("use Math::dot() instead") static T dot(const Vector& a, const Vector& b) { - return Math::dot(a, b); - } - - /** - * @brief @copybrief Magnum::Math::angle(const Vector&, const Vector&) - * @deprecated Use @ref Math::angle(const Vector&, const Vector&) - * instead. - */ - CORRADE_DEPRECATED("use Math::angle() instead") static Rad angle(const Vector& normalizedA, const Vector& normalizedB) { - return Math::angle(normalizedA, normalizedB); - } - #endif - /** * @brief Default constructor * diff --git a/src/Magnum/Math/Vector2.h b/src/Magnum/Math/Vector2.h index 1971fc0c6..d04adafc8 100644 --- a/src/Magnum/Math/Vector2.h +++ b/src/Magnum/Math/Vector2.h @@ -104,17 +104,6 @@ template class Vector2: public Vector<2, T> { */ constexpr static Vector2 yScale(T scale) { return {T(1), scale}; } - #ifdef MAGNUM_BUILD_DEPRECATED - /** - * @brief @copybrief Math::cross(const Vector2&, const Vector2&) - * @deprecated Use @ref Math::cross(const Vector2&, const Vector2&) - * instead. - */ - CORRADE_DEPRECATED("use Math::cross() instead") static T cross(const Vector2& a, const Vector2& b) { - return Math::cross(a, b); - } - #endif - /** @copydoc Vector::Vector(ZeroInitT) */ constexpr /*implicit*/ Vector2(ZeroInitT = ZeroInit) noexcept /** @todoc remove workaround when doxygen is sane */ diff --git a/src/Magnum/Math/Vector3.h b/src/Magnum/Math/Vector3.h index cdd563033..89d2f2352 100644 --- a/src/Magnum/Math/Vector3.h +++ b/src/Magnum/Math/Vector3.h @@ -126,17 +126,6 @@ template class Vector3: public Vector<3, T> { */ constexpr static Vector3 zScale(T scale) { return {T(1), T(1), scale}; } - #ifdef MAGNUM_BUILD_DEPRECATED - /** - * @brief @copybrief Math::cross(const Vector3&, const Vector3&) - * @deprecated Use @ref Math::cross(const Vector3&, const Vector3&) - * instead. - */ - CORRADE_DEPRECATED("use Math::cross() instead") static Vector3 cross(const Vector3& a, const Vector3& b) { - return Math::cross(a, b); - } - #endif - /** @copydoc Vector::Vector(ZeroInitT) */ constexpr /*implicit*/ Vector3(ZeroInitT = ZeroInit) noexcept /** @todoc remove workaround when doxygen is sane */