Crate strict_num

Source
Expand description

A collection of bounded numeric types.

Includes:

Unlike f32/f64, all float types implement Ord, PartialOrd and Hash, since it’s guaranteed that they all are finite.

Structs§

FiniteF32
An immutable, finite f32.
FiniteF64
An immutable, finite f64.
NonZeroPositiveF32
An immutable, finite f32 that is known to be > 0.
NonZeroPositiveF64
An immutable, finite f64 that is known to be > 0.
NormalizedF32
An immutable, finite f32 in a 0..=1 range.
NormalizedF64
An immutable, finite f64 in a 0..=1 range.
PositiveF32
An immutable, finite f32 that is known to be >= 0.
PositiveF64
An immutable, finite f64 that is known to be >= 0.

Traits§

ApproxEq
A trait for approximate equality comparisons.
ApproxEqUlps
ApproxEqUlps is a trait for approximate equality comparisons. The associated type Flt is a floating point type which implements Ulps, and is required so that this trait can be implemented for compound types (e.g. vectors), not just for the floats themselves.
Ulps