1/// Floor (f64)
2///
3/// Finds the nearest integer less than or equal to `x`.
4#[cfg_attr(all(test, assert_no_panic), no_panic::no_panic)]
5pub fn floor(x: f64) -> f64 {
6 select_implementation! {
7 name: floor,
8 use_arch: all(target_arch = "wasm32", intrinsics_enabled),
9 use_arch_required: all(target_arch = "x86", not(target_feature = "sse2")),
10 args: x,
11 }
12
13 return super::generic::floor(x);
14}
15