decorum

Type Alias NotNan

Source
pub type NotNan<T> = ConstrainedFloat<T, NotNanConstraint<T>>;
Expand description

Floating-point representation that cannot be NaN.

If an operation emits NaN, then a panic will occur. Like Total, this type implements a total ordering.

Aliased Type§

struct NotNan<T> { /* private fields */ }

Trait Implementations§

Source§

impl<T> Debug for NotNan<T>
where T: Debug + Float + Primitive,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T> From<ConstrainedFloat<T, FiniteConstraint<T>>> for NotNan<T>
where T: Float + Primitive,

Source§

fn from(other: Finite<T>) -> Self

Converts to this type from the input type.