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