-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
f64::from(bool) and f32::from(bool) #74015
Copy link
Copy link
Closed
Labels
A-floating-pointArea: Floating point numbers and arithmeticArea: Floating point numbers and arithmeticC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language team
Metadata
Metadata
Assignees
Labels
A-floating-pointArea: Floating point numbers and arithmeticArea: Floating point numbers and arithmeticC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-langRelevant to the language teamRelevant to the language team
Type
Fields
Give feedbackNo fields configured for issues without a type.
I think
f64::from(bool)andf32::from(bool)could be added. Currently I perform that in two steps:f64::from(u32::from(bool))f32::from(u16::from(bool))