js_sys::Math

Function abs

source
pub fn abs(x: f64) -> f64
Expand description

The Math.abs() function returns the absolute value of a number, that is Math.abs(x) = |x|

MDN documentation