pub fn f64_to_bool(a: f64) -> bool
Parse f64 to bool
f64
bool
If a is 0 then returns false, otherwise true.
a
false
true
use rustils::parse::boolean::f64_to_bool; let a = 42.0_f64; let b = -1.0_f64; let c = 0.0_f64; assert!(f64_to_bool(a)); assert!(f64_to_bool(b)); assert!(!f64_to_bool(c));