Deprecate `normalize`

See #371.
This commit is contained in:
Jack Wrenn 2018-12-10 16:30:05 -05:00 committed by Sébastien Crozet
parent e89faca588
commit 8a5e062e7e
1 changed files with 8 additions and 0 deletions

View File

@ -527,6 +527,14 @@ pub fn magnitude_squared<V: NormedSpace>(v: &V) -> V::Field {
} }
/// Computes the normalized version of the vector `v`. /// Computes the normalized version of the vector `v`.
///
/// # Deprecated
/// Use these methods instead:
/// * [Matrix::normalize]
/// * [Quaternion::normalize]
///
/// Or, use [NormedSpace::normalize](https://docs.rs/alga/0.7.2/alga/linear/trait.NormedSpace.html#tymethod.normalize).
#[deprecated(note = "use `Matrix::normalize` or `Quaternion::normalize` instead")]
#[inline] #[inline]
pub fn normalize<V: NormedSpace>(v: &V) -> V { pub fn normalize<V: NormedSpace>(v: &V) -> V {
v.normalize() v.normalize()