v/vlib/math/abs.v

10 lines
118 B
V
Raw Normal View History

module math
[deprecated: 'use math.abs() instead']
pub fn fabs(x f64) f64 {
if x > 0.0 {
return x
}
return -x
}