pub fn trunc(x: f64) -> f64 ⓘ
dep_js_sys
The Math.trunc() function returns the integer part of a number by removing any fractional digits.
Math.trunc()
MDN documentation