So I stumbled across this line of code “if i % 3 < 2 then”

And I’m not very bright when it comes to maths so I was wondering if anyone could help me with what this means or what it equals to

(The loop it’s talking about is “for i = 1 , 15 do”)

It checks if the floor remainder of the value divided by three is less than 2.

1 Like

The `%`

operator is a modulus, which gives you the remainder between two numbers. For example, in your case, if `i = 4`

, then `i % 3`

would equal to `1`

.

1 Like