Numuse Documentation

numuse.tools.ranged_modulus_operator

numuse.tools.ranged_modulus_operator

numuse.tools.ranged_modulus_operator(x: int, m: int = 12)int[source]

Return what x is congruent to in the range 0 … m-1

Parameters
  • x (int) – The number to be converted

  • m (int) – The modulus

Returns

The unique number from 0 to m-1 (inclusive) that x is congruent to

Return type

int

Free document hosting provided by Read the Docs.