diff options
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1061,4 +1061,12 @@ static function sort($array, $mode = "") return $array; } +/** + * returns $a modulo $n as a positive number between 0 and $n - 1 + */ +static function mod($a, $n) +{ + return (($a % $n) + $n) % $n; +} + } |