public static long floorMod (long x, long y)

Returns the floor modulus of the long 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, long), StrictMath.floorDiv(long, long)

Since:  1.8