Deprecate `magnitude_squared`

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

View File

@ -513,6 +513,14 @@ pub fn magnitude<V: NormedSpace>(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: NormedSpace>(v: &V) -> V::Field {
v.norm_squared()