Deprecate `norm_squared`

See #371.
This commit is contained in:
Jack Wrenn 2018-12-10 16:24:08 -05:00 committed by Sébastien Crozet
parent e55c72fddc
commit 2bb7c011b1
1 changed files with 10 additions and 2 deletions

View File

@ -455,8 +455,8 @@ pub fn angle<V: InnerSpace>(a: &V, b: &V) -> V::Real {
/// ///
/// # Deprecated /// # Deprecated
/// Use these methods instead: /// Use these methods instead:
/// - [Matrix::norm] /// * [Matrix::norm]
/// - [Quaternion::norm] /// * [Quaternion::norm]
/// ///
/// Or, use [NormedSpace::norm](https://docs.rs/alga/0.7.2/alga/linear/trait.NormedSpace.html#tymethod.norm). /// Or, use [NormedSpace::norm](https://docs.rs/alga/0.7.2/alga/linear/trait.NormedSpace.html#tymethod.norm).
#[deprecated(note = "use `Matrix::norm` or `Quaternion::norm` instead")] #[deprecated(note = "use `Matrix::norm` or `Quaternion::norm` instead")]
@ -472,6 +472,14 @@ pub fn norm<V: NormedSpace>(v: &V) -> V::Field {
/// * [`magnitude`](fn.magnitude.html) /// * [`magnitude`](fn.magnitude.html)
/// * [`magnitude_squared`](fn.magnitude_squared.html) /// * [`magnitude_squared`](fn.magnitude_squared.html)
/// * [`norm`](fn.norm.html) /// * [`norm`](fn.norm.html)
///
/// # Deprecated
/// Use these methods instead:
/// * [Matrix::norm_squared]
/// * [Quaternion::norm_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::norm_squared` or `Quaternion::norm_squared` instead")]
#[inline] #[inline]
pub fn norm_squared<V: NormedSpace>(v: &V) -> V::Field { pub fn norm_squared<V: NormedSpace>(v: &V) -> V::Field {
v.norm_squared() v.norm_squared()