diff --git a/alga/src/general/real.rs b/alga/src/general/real.rs index e76d28a..5e094ff 100644 --- a/alga/src/general/real.rs +++ b/alga/src/general/real.rs @@ -106,6 +106,8 @@ pub trait Real: fn ln_2() -> Self; fn ln_10() -> Self; + fn is_finite(&self) -> bool; + /// Cardinal sine #[inline] fn sinc(self) -> Self { @@ -429,6 +431,10 @@ macro_rules! impl_real( fn ln_10() -> Self { $M::consts::LN_10 } + + fn is_finite(&self) -> bool { + $M::is_finite(*self) + } } )*) );