MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / wasm_trunc

Method wasm_trunc

crates/core/src/math.rs:84–93  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

82impl WasmFloat for f32 {
83 #[inline]
84 fn wasm_trunc(self) -> f32 {
85 if self.is_nan() {
86 return f32::NAN;
87 }
88 #[cfg(feature = "std")]
89 if !cfg!(windows) && !cfg!(target_arch = "riscv64") {
90 return self.trunc();
91 }
92 libm::truncf(self)
93 }
94 #[inline]
95 fn wasm_copysign(self, sign: f32) -> f32 {
96 #[cfg(feature = "std")]

Callers 7

check_xnn_from_f64Method · 0.80
ftrunc32Method · 0.80
vtrunc32x4Method · 0.80
vtrunc64x2Method · 0.80
ftrunc64Method · 0.80
trunc_f32Function · 0.80
trunc_f64Function · 0.80

Calls 4

truncfFunction · 0.85
truncFunction · 0.85
is_nanMethod · 0.80
truncMethod · 0.80

Tested by

no test coverage detected