[−][src]Function gbdt::fitness::almost_equal_thrs
pub fn almost_equal_thrs(a: ValueType, b: ValueType, thrs: f64) -> bool
Comparing two number with a costomized floating error threshold.
Example
use gbdt::fitness::almost_equal_thrs; assert_eq!(true, almost_equal_thrs(1.0, 0.998, 0.01));