Skip to main content

## f64_trunc

# Function f64_trunc

Source

    pub fn f64_trunc(a: f64) -> f64

🔬This is a nightly-only experimental API. (`wasm_numeric_instr` #133908)
Available on WebAssembly only.
Expand description

Generates the `f64.trunc` instruction, roundinging to the nearest integer towards zero.

This method is useful when targeting `no_std` and is equivalent to `std::f64::trunc()`.