Skip to content

Commit

Permalink
Expose UniformNotNan
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrubeck committed Aug 17, 2023
1 parent d64c3c3 commit e57fd99
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use num_traits::{
pub use num_traits::{Float, Pow};

#[cfg(feature = "rand")]
pub use impl_rand::UniformOrdered;
pub use impl_rand::{UniformNotNan, UniformOrdered};

// masks for the parts of the IEEE 754 float
const SIGN_MASK: u64 = 0x8000000000000000u64;
Expand Down Expand Up @@ -2246,6 +2246,7 @@ mod impl_rand {
impl_distribution! { Open01, f32, f64 }
impl_distribution! { OpenClosed01, f32, f64 }

/// A sampler for a uniform distribution
#[derive(Clone, Copy, Debug, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct UniformNotNan<T>(UniformFloat<T>);
Expand Down

0 comments on commit e57fd99

Please sign in to comment.