From e89faca588bdcac5675f5cbe73b634c5091e70ce Mon Sep 17 00:00:00 2001 From: Jack Wrenn Date: Mon, 10 Dec 2018 16:26:43 -0500 Subject: [PATCH] Deprecate `magnitude_squared` See #371. --- src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index f57b1664..f5dd560a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -513,6 +513,14 @@ pub fn magnitude(v: &V) -> V::Field { /// * [`magnitude`](fn.magnitude.html) /// * [`norm`](fn.norm.html) /// * [`norm_squared`](fn.norm_squared.html) +/// +/// # Deprecated +/// Use these methods instead: +/// * [Matrix::magnitude_squared] +/// * [Quaternion::magnitude_squared] +/// +/// Or, use [NormedSpace::norm_squared](https://docs.rs/alga/0.7.2/alga/linear/trait.NormedSpace.html#tymethod.norm_squared). +#[deprecated(note = "use `Matrix::magnitude_squared` or `Quaternion::magnitude_squared` instead")] #[inline] pub fn magnitude_squared(v: &V) -> V::Field { v.norm_squared()