]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/f32.rs
fmt
[rust.git] / library / std / src / f32.rs
index 3dd5b12507fb2b136692e8e7220fda047d4fb261..4127c4056f24ed8125bfe974439616a5394b1c53 100644 (file)
@@ -77,9 +77,11 @@ pub fn ceil(self) -> f32 {
     /// ```
     /// let f = 3.3_f32;
     /// let g = -3.3_f32;
+    /// let h = -3.7_f32;
     ///
     /// 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"]
@@ -275,7 +277,7 @@ pub fn div_euclid(self, rhs: f32) -> f32 {
     /// This result is not an element of the function's codomain, but it is the
     /// closest floating point number in the real numbers and thus fulfills the
     /// property `self == self.div_euclid(rhs) * rhs + self.rem_euclid(rhs)`
-    /// approximatively.
+    /// approximately.
     ///
     /// # Examples
     ///