src/Utility/Math.php
public static function floorMod(int $a, int $b) : int
    {
        return (($a % $b) + $b) % $b;
    }
public static function floorMod(int $a, int $b) : int
    {
        return (($a % $b) + $b) % $b;
    }
public static function floorMod ( int $ a , int $ b ) : int { return ( ( $ a % $ b ) + $ b ) % $ b ; }
Returns the floor modulus of the integer arguments.

The relationship between floorDiv and floorMod is such that:
floorDiv(x, y) * y + floorMod(x, y) == x

@param int $a The first argument.
@param int $b The second argument, non-zero.

@return int
Returns the floor modulus of the integer arguments .