diff options
| author | bmoxb <maxoblack@yahoo.com> | 2023-03-09 20:36:26 +0000 |
|---|---|---|
| committer | bmoxb <maxoblack@yahoo.com> | 2023-03-09 20:36:29 +0000 |
| commit | 73016bb8d4a5f20dd07524854d29ff9177ccbe54 (patch) | |
| tree | 6d0fc5f43be7a1d2bb8dbddfb67ae0e02301ddc7 | |
| parent | d5bb6056f16bae301b498bd44ad286685bb5e618 (diff) | |
| download | rust-73016bb8d4a5f20dd07524854d29ff9177ccbe54.tar.gz rust-73016bb8d4a5f20dd07524854d29ff9177ccbe54.zip | |
Indicate that `0.0` refers to positive `0.0`
| -rw-r--r-- | library/core/src/convert/num.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/convert/num.rs b/library/core/src/convert/num.rs index 8c407d07c51..205fe3d382e 100644 --- a/library/core/src/convert/num.rs +++ b/library/core/src/convert/num.rs @@ -172,8 +172,8 @@ impl_from! { f32, f64, #[stable(feature = "lossless_float_conv", since = "1.6.0" #[stable(feature = "float_from_bool", since = "1.68.0")] #[rustc_const_unstable(feature = "const_num_from_num", issue = "87852")] impl const From<bool> for f32 { - /// Converts `bool` to `f32` losslessly. The resulting value is `0.0` for - /// `false` and `1.0` for `true` values. + /// Converts `bool` to `f32` losslessly. The resulting value is positive + /// `0.0` for `false` and `1.0` for `true` values. #[inline] fn from(small: bool) -> Self { small as u8 as Self |
