trunc(x: f64) → f64

Category: [math](builtinsmath)_

Discard the fractional part, rounding toward zero.

ParameterTypeDescriptionRemarks
xf64The input value.
returnsf64The result.
wcl
trunc(3.9)   // drop the fractional part → 3.0