num_traits::ops

Module saturating

source

Traitsยง

  • Saturating math operations. Deprecated, use SaturatingAdd, SaturatingSub and SaturatingMul instead.
  • Performs addition that saturates at the numeric bounds instead of overflowing.
  • Performs multiplication that saturates at the numeric bounds instead of overflowing.
  • Performs subtraction that saturates at the numeric bounds instead of overflowing.