diff --git a/src/complex_float.rs b/src/complex_float.rs index 873fe73..6059a5f 100644 --- a/src/complex_float.rs +++ b/src/complex_float.rs @@ -1,7 +1,7 @@ // Keeps us from accidentally creating a recursive impl rather than a real one. #![deny(unconditional_recursion)] -use core::ops::Neg; +use core::ops::{Add, Div, Mul, Neg, Rem, Sub}; use num_traits::{Float, FloatConst, Num, NumCast}; @@ -25,7 +25,19 @@ mod private { /// /// This trait is sealed to prevent it from being implemented by anything other /// than floating point scalars and [Complex] floats. -pub trait ComplexFloat: Num + NumCast + Copy + Neg + private::Seal { +pub trait ComplexFloat: + Num + + NumCast + + Copy + + Neg + + From<::Real> + + Add<::Real, Output = Self> + + Sub<::Real, Output = Self> + + Mul<::Real, Output = Self> + + Div<::Real, Output = Self> + + Rem<::Real, Output = Self> + + private::Seal +{ /// The type used to represent the real coefficients of this complex number. type Real: Float + FloatConst;