diff options
| author | Wilfred Hughes <me@wilfred.me.uk> | 2023-02-05 19:38:08 -0800 |
|---|---|---|
| committer | Wilfred Hughes <me@wilfred.me.uk> | 2023-02-05 19:44:21 -0800 |
| commit | 4a7a9b4e74fce7d39e53aeae3b85cdfc7bb588a6 (patch) | |
| tree | 421f4d3ad87a7c411a07b898c1c5ca3a2e042262 | |
| parent | 14ea63a7e005f9ca48bc13df6cb4fc5afe32febe (diff) | |
| download | rust-4a7a9b4e74fce7d39e53aeae3b85cdfc7bb588a6.tar.gz rust-4a7a9b4e74fce7d39e53aeae3b85cdfc7bb588a6.zip | |
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.
| -rw-r--r-- | library/std/src/f32.rs | 4 | ||||
| -rw-r--r-- | library/std/src/f64.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/library/std/src/f32.rs b/library/std/src/f32.rs index 4e300762463..6b1f0cba82d 100644 --- a/library/std/src/f32.rs +++ b/library/std/src/f32.rs @@ -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 /// diff --git a/library/std/src/f64.rs b/library/std/src/f64.rs index ec67fdad4f7..16359766b51 100644 --- a/library/std/src/f64.rs +++ b/library/std/src/f64.rs @@ -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 /// |
