Function trunc

Source
pub fn trunc(x: f64) -> f64
Expand description

Rounds the number toward 0 to the closest integral value (f64).

This effectively removes the decimal part of the number, leaving the integral part.