Crate rotary_add

source ·

Traits§

  • CycleAdd works on range from 0 to a a specified base. The max value is 1 less than the base Trait with methods for cyclical arithmetic with unsigned integers Values rotate within a range of zero to 1 below the specified base, when normal addition or subtraction would yield out-of-range values
  • RotaryAdd works on the whole range of the unsigned integer Trait with methods for cyclical or rotary arithmetic with unsigned integers When additions or subtractions may otherwise overflow, either falling below zero or above the type’s maximum, the values rotate. This is mainly for use with cryptography