We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ae5235 commit 2045f2dCopy full SHA for 2045f2d
src/lib.rs
@@ -104,7 +104,9 @@ impl<T> Complex<T> {
104
}
105
106
impl<T: Clone + Num> Complex<T> {
107
- /// Returns imaginary unit
+ /// Returns the imaginary unit.
108
+ ///
109
+ /// See also [`Complex::I`].
110
#[inline]
111
pub fn i() -> Self {
112
Self::new(T::zero(), T::one())
@@ -1176,6 +1178,9 @@ impl<T: Clone + Num> Zero for Complex<T> {
1176
1178
impl<T: ConstOne + ConstZero> Complex<T> {
1177
1179
/// A constant `Complex` 1.
1180
pub const ONE: Self = Self::new(T::ONE, T::ZERO);
1181
+
1182
+ /// A constant `Complex` _i_, the imaginary unit.
1183
+ pub const I: Self = Self::new(T::ZERO, T::ONE);
1184
1185
1186
impl<T: Clone + Num + ConstOne + ConstZero> ConstOne for Complex<T> {
0 commit comments