wrapping_add_signed

Function wrapping_add_signed 

Source
pub open spec fn wrapping_add_signed(x: u16, y: i16) -> u16
Expand description
{
    if x + y > <u16>::MAX {
        (x + y - 0x1_0000) as u16
    } else if x + y < 0 {
        (x + y + 0x1_0000) as u16
    } else {
        (x + y) as u16
    }
}