mod 1.0
number1 mod number2
Reports number1 modulo number2: that is, the residue of number1 (mod number2). mod is is equivalent to the following NetLogo code:
number1 - (floor (number1 / number2)) * number2Note that mod is “infix”, that is, it comes between its two inputs.
show 62 mod 5
=> 2
show -8 mod 3
=> 1See also remainder. mod and remainder
behave the same for positive numbers, but differently for
negative numbers.