Deprecate `origin`

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

View File

@ -189,6 +189,12 @@ pub fn zero<T: Identity<Additive>>() -> T {
///
/// * [`one`](fn.one.html)
/// * [`zero`](fn.zero.html)
///
/// # Deprecated
/// Use [Point::origin] instead.
///
/// Or, use [EuclideanSpace::origin](https://docs.rs/alga/0.7.2/alga/linear/trait.EuclideanSpace.html#tymethod.origin).
#[deprecated(note = "use `Point::origin` instead")]
#[inline]
pub fn origin<P: EuclideanSpace>() -> P {
P::origin()