diff options
Diffstat (limited to 'libpsi-core/src/maths/numeric.rs')
| -rw-r--r-- | libpsi-core/src/maths/numeric.rs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/libpsi-core/src/maths/numeric.rs b/libpsi-core/src/maths/numeric.rs index 0fd4380..f5a649e 100644 --- a/libpsi-core/src/maths/numeric.rs +++ b/libpsi-core/src/maths/numeric.rs @@ -19,17 +19,10 @@ macro_rules! impl_numeric { macro_rules! impl_cnumeric { ($($t:ty),*) => { - $( - impl Numeric for Complex<$t> { - fn zero() -> Self { - Complex::new(0.0, 0.0) - } - - fn one() -> Self { - Complex::new(1.0, 0.0) - } - } - )* + $(impl Numeric for Complex<$t> { + fn zero() -> Self { Complex::new(0.0, 0.0) } + fn one() -> Self { Complex::new(1.0, 0.0) } + })* }; } @@ -96,7 +89,6 @@ pub trait Numeric: impl_numeric!(i32, i64, f32, f64); impl_cnumeric!(f32, f64); - impl_float!(f32, libm::sqrtf, libm::atan2f); impl_float!(f64, libm::sqrt, libm::atan2); impl_cfloat!(f32, libm::sqrtf, libm::atan2f, libm::cosf, libm::sinf); |
