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:

`floorDiv(x, y) * y + floorMod(x, y) == x`

For examples, see `floorMod(int, int)`

.

`x` | the dividend | |

`y` | the divisor |

` x - (floorDiv(x, y) * y)`

`ArithmeticException` | if the divisor ` y` is zero |

floorDiv(long, long)

Diagram: Math