Skip to main content

is_zero_approx

Function is_zero_approx 

pub fn is_zero_approx(x: f64) -> bool
Expand description

Returns true if x is zero or almost zero. The comparison is done using a tolerance calculation with a small internal epsilon.

This function is faster than using [method is_equal_approx] with one value as zero.