Advertisement

"Modulo" is the remainder after division. 5 modulo 4 is 1. 8 modulo 4 is 0. Ruby use the symbol % as modulo operator.

It can be useful in some cases, mainly when you create a list of values like [0,2,3,4,5][(frame/50)%5].
Community content is available under CC-BY-SA unless otherwise noted.