Frictional Games Forum (read-only)

Full Version: Small question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Code:
SetLocalVarFloat(sName+"Speed", gvMonolithSpeeds[lCount%5]*RandFloat(0.04f,0.06f));

Code:
gvMonolithSpeeds[lCount%5]

Code:
%

Can someone tell me what this is called and what it does (%)? I've seen it alot recently but I haven't really quite understood it yet.
It is the Modulo operator. Something to with dividing a number by another, then returning the remainder.

https://en.wikipedia.org/wiki/Modulo_operation
Alright, thanks.