num::traits

Function abs_sub

Source
pub fn abs_sub<T>(x: T, y: T) -> T
where T: Signed,
Expand description

The positive difference of two numbers.

Returns zero if x is less than or equal to y, otherwise the difference between x and y is returned.