aboutsummaryrefslogtreecommitdiff
path: root/libpsi-core/src/maths/numeric.rs
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2024-10-12 19:01:40 +0200
committerhachem <im@hachem.wtf>2024-10-12 19:01:40 +0200
commit00c4b7c44b1364381c65dccbb190d64b3ff4c1e8 (patch)
tree5169843dcebc5807fdeb03120f2a997ba844d361 /libpsi-core/src/maths/numeric.rs
parentb04d0578c59299598c298f3ca83af3278b13f08c (diff)
Refactor 3: Matrices and fixed complex number matrix printing
Diffstat (limited to 'libpsi-core/src/maths/numeric.rs')
-rw-r--r--libpsi-core/src/maths/numeric.rs16
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);