Skip to content

Commit 4a7a9b4

Browse files
committed
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.
1 parent 14ea63a commit 4a7a9b4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: 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
///

Diff for: 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)