We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73016bb commit 8d2bdb8Copy full SHA for 8d2bdb8
library/core/src/convert/num.rs
@@ -182,7 +182,8 @@ impl const From<bool> for f32 {
182
#[stable(feature = "float_from_bool", since = "1.68.0")]
183
#[rustc_const_unstable(feature = "const_num_from_num", issue = "87852")]
184
impl const From<bool> for f64 {
185
- /// Converts `bool` to `f64` losslessly.
+ /// Converts `bool` to `f64` losslessly. The resulting value is positive
186
+ /// `0.0` for `false` and `1.0` for `true` values.
187
#[inline]
188
fn from(small: bool) -> Self {
189
small as u8 as Self
0 commit comments