Debian Codegraph @

debian/rust-vendor/libm/src/math/round.rs

raw
1 /// Round `x` to the nearest integer, breaking ties away from zero.
2 #[cfg(f16_enabled)]
3 #[cfg_attr(assert_no_panic, no_panic::no_panic)]
4 pub fn roundf16(x: f16) -> f16 {
5 super::generic::round(x)
6 }
7
8 /// Round `x` to the nearest integer, breaking ties away from zero.
9 #[cfg_attr(assert_no_panic, no_panic::no_panic)]
10 pub fn roundf(x: f32) -> f32 {
11 super::generic::round(x)
12 }
13
14 /// Round `x` to the nearest integer, breaking ties away from zero.
15 #[cfg_attr(assert_no_panic, no_panic::no_panic)]
16 pub fn round(x: f64) -> f64 {
17 super::generic::round(x)
18 }
19
20 /// Round `x` to the nearest integer, breaking ties away from zero.
21 #[cfg(f128_enabled)]
22 #[cfg_attr(assert_no_panic, no_panic::no_panic)]
23 pub fn roundf128(x: f128) -> f128 {
24 super::generic::round(x)
25 }