Skip to content

f64::from(bool) and f32::from(bool) #74015

Closed
@leonardo-m

Description

@leonardo-m

I think f64::from(bool) and f32::from(bool) could be added. Currently I perform that in two steps:

f64::from(u32::from(bool))
f32::from(u16::from(bool))

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-floating-pointArea: Floating point numbers and arithmeticC-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-langRelevant to the language team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions