X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=library%2Fstd%2Fsrc%2Ff64.rs;h=cc64258da60d1a63fdc44ef0f72f41d07e2ab976;hb=56a28a65f54b846abc93945a58a5e3b93b109dc6;hp=77048f9a28f2516f18c43fe550f4ba1bb095fc1e;hpb=c013962695462a809163b30b8a3fe1e46eaf6a77;p=rust.git diff --git a/library/std/src/f64.rs b/library/std/src/f64.rs index 77048f9a28f..cc64258da60 100644 --- a/library/std/src/f64.rs +++ b/library/std/src/f64.rs @@ -77,9 +77,11 @@ pub fn ceil(self) -> f64 { /// ``` /// let f = 3.3_f64; /// let g = -3.3_f64; + /// let h = -3.7_f64; /// /// assert_eq!(f.round(), 3.0); /// assert_eq!(g.round(), -3.0); + /// assert_eq!(h.round(), -4.0); /// ``` #[rustc_allow_incoherent_impl] #[must_use = "method returns a new number and does not mutate the original value"]