Crate tangram_finite[][src]

Expand description

This crate provides the Finite type, which is used to indicate that a floating point number is not infinite and not NaN. It is similar to the standard library’s NonZero{U8, I8, etc.} types.

Example

use tangram_finite::Finite;

let n = <Finite<f32>>::new(1.0).unwrap();
assert!(Finite::new(n.get() / 0.0).is_err());

Structs

The Finite type is used to indicate that a floating point number is not infinite and not NaN. It is similar in spirit to the standard library’s NonZero{U8, I8, etc.} types.

An error type indicating that the number is not finite.

Type Definitions