trunc(x: f64) → f64
Category: [math](builtinsmath)_
Discard the fractional part, rounding toward zero.
| Parameter | Type | Description | Remarks |
|---|---|---|---|
| x | f64 | The input value. | — |
| returns | f64 | The result. | — |
wcl
trunc(3.9) // drop the fractional part → 3.0trunc(x: f64) → f64
Category: [math](builtinsmath)_
Discard the fractional part, rounding toward zero.
| Parameter | Type | Description | Remarks |
|---|---|---|---|
| x | f64 | The input value. | — |
| returns | f64 | The result. | — |
trunc(3.9) // drop the fractional part → 3.0