Function idsp::overflowing_sub

source ·
pub fn overflowing_sub<T>(y: T, x: T) -> (T, i32)
Expand description

Subtract y - x with signed overflow.

This is very similar to i32::overflowing_sub(y, x) except that the overflow indicator is not a boolean but the signum of the overflow. Additionally it’s typically faster.

Returns: A tuple containg the (wrapped) difference y - x and the signum of the overflow.