Skip to content

Commit 7c4e6ed

Browse files
authored
Rollup merge of rust-lang#107714 - Wilfred:round_docs, r=m-ou-se
Clarify wording on f64::round() and f32::round() "Round half-way cases" is a little confusing (it's a 'garden path sentence' as it's not immediately clear whether round is an adjective or verb). Make this sentence longer and clearer.
2 parents a5288a7 + 4a7a9b4 commit 7c4e6ed

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

library/std/src/f32.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ impl f32 {
6969
unsafe { intrinsics::ceilf32(self) }
7070
}
7171

72-
/// Returns the nearest integer to `self`. Round half-way cases away from
73-
/// `0.0`.
72+
/// Returns the nearest integer to `self`. If a value is half-way between two
73+
/// integers, round away from `0.0`.
7474
///
7575
/// # Examples
7676
///

library/std/src/f64.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ impl f64 {
6969
unsafe { intrinsics::ceilf64(self) }
7070
}
7171

72-
/// Returns the nearest integer to `self`. Round half-way cases away from
73-
/// `0.0`.
72+
/// Returns the nearest integer to `self`. If a value is half-way between two
73+
/// integers, round away from `0.0`.
7474
///
7575
/// # Examples
7676
///

0 commit comments

Comments
 (0)