[][src]Module kai::close

Functions for checking if two floating-point numbers are close enough to be considered equal

These functions use the std::f**::EPSILON constants to check if two numbers are close enough for their difference to be the result of rounding errors. I made these primarily to get clippy off my back about directly comparing floats.

Functions

f32

Check if two f32s are close enough to be considered equal

f32_ref

Check if two &f32s are close enough to be considered equal

f64

Check if two f64s are close enough to be considered equal

f64_ref

Check if two &f64s are close enough to be considered equal