From daadac76471d7e99c303d7343a5dc3aa62b794c3 Mon Sep 17 00:00:00 2001 From: Jack Wrenn Date: Mon, 10 Dec 2018 16:30:47 -0500 Subject: [PATCH] Deprecate `try_normalize` See #371. --- src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index ec6dc10f..f3cb8c71 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -541,6 +541,14 @@ pub fn normalize(v: &V) -> V { } /// Computes the normalized version of the vector `v` or returns `None` if its norm is smaller than `min_norm`. +/// +/// # Deprecated +/// Use these methods instead: +/// * [Matrix::try_normalize] +/// * [Quaternion::try_normalize] +/// +/// Or, use [NormedSpace::try_normalize](https://docs.rs/alga/0.7.2/alga/linear/trait.NormedSpace.html#tymethod.try_normalize). +#[deprecated(note = "use `Matrix::try_normalize` or `Quaternion::try_normalize` instead")] #[inline] pub fn try_normalize(v: &V, min_norm: V::Field) -> Option { v.try_normalize(min_norm)