Skip to content

Commit

Permalink
Merge pull request #59 from jojolepro/finite
Browse files Browse the repository at this point in the history
Added is_finite method for Real
  • Loading branch information
sebcrozet authored Mar 31, 2019
2 parents 3e2910e + 80b22cd commit 0637cac
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions alga/src/general/real.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
}
}
)*)
);
Expand Down

0 comments on commit 0637cac

Please sign in to comment.