Indicate that 0.0
refers to positive 0.0
This commit is contained in:
parent
d5bb6056f1
commit
73016bb8d4
@ -172,8 +172,8 @@ macro_rules! impl_from_bool {
|
||||
#[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
|
||||
|
Loading…
Reference in New Issue
Block a user