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:
Wilfred Hughes 2023-02-05 19:38:08 -08:00
parent 14ea63a7e0
commit 4a7a9b4e74
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
///