Idea: methods to convert unsigned numbers and sign (bool) to signed numbers

The function signature looks like this:

impl i64 {
    pub const fn from_unsigned_sign(unsigned: u64, sign: bool) -> i64 {
        // ...

Maybe variants like checked, overflowing, saturating, wrapping are needed.

What's the expected (default) behavior on overflow?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.