From 8e267ee4cb81a5a1ab1b7dabe70d2fa8d6988a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Jan=20Niemier?= Date: Wed, 30 Dec 2015 10:57:54 +0100 Subject: [PATCH] Fix docs and function position --- src/complex.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/complex.rs b/src/complex.rs index 4a271c9..6524eb9 100644 --- a/src/complex.rs +++ b/src/complex.rs @@ -39,6 +39,12 @@ impl Complex { Complex { re: re, im: im } } + /// Returns imaginary unit + #[inline] + pub fn i() -> Complex { + Self::new(T::zero(), T::one()) + } + /// Returns the square of the norm (since `T` doesn't necessarily /// have a sqrt function), i.e. `re^2 + im^2`. #[inline] @@ -59,14 +65,6 @@ impl Complex { } } -impl Complex { - /// Returns `i` - #[inline] - pub fn i() -> Complex { - Self::new(T::zero(), T::one()) - } -} - impl> Complex { /// Returns the complex conjugate. i.e. `re - i im` #[inline]