Rollup merge of #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.
This commit is contained in:
Matthias Krüger 2023-02-06 21:16:41 +01:00 committed by GitHub
commit 7c4e6edb05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -69,8 +69,8 @@ impl f32 {
unsafe { intrinsics::ceilf32(self) }
}
/// Returns the nearest integer to `self`. Round half-way cases away from
/// `0.0`.
/// Returns the nearest integer to `self`. If a value is half-way between two
/// integers, round away from `0.0`.
///
/// # Examples
///

View File

@ -69,8 +69,8 @@ impl f64 {
unsafe { intrinsics::ceilf64(self) }
}
/// Returns the nearest integer to `self`. Round half-way cases away from
/// `0.0`.
/// Returns the nearest integer to `self`. If a value is half-way between two
/// integers, round away from `0.0`.
///
/// # Examples
///