public static int floorMod (long x, int y)

Returns the floor modulus of the long and int arguments.

The floor modulus is x - (floorDiv(x, y) * y), has the same sign as the divisor y, and is in the range of -abs(y) < r < +abs(y).

The relationship between floorDiv and floorMod is such that:

See Math.floorMod for examples and a comparison to the % operator.

Parameters:
x    the dividend
y    the divisor

Returns:  the floor modulus x - (floorDiv(x, y) * y)

Exceptions:
ArithmeticException    if the divisor y is zero

See also:
Math.floorMod(long, int), StrictMath.floorDiv(long, int)

Since:  9