Function |saturating_sub

std/ops/num::|saturating_sub


Usage

|saturating_sub<N>(a, b)

Generics

◻ N: SaturatingSub

Parameters

↳ a: N
↳ b: N

Return

↴ N


Sustract b from a, saturating to bounds.

This function is infaillible and saturate to the closest bound, minimal or maximal, if a - b is out of bounds for the data type.