HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Modulo ???

05-12-2008, 09:25 AM#1
Dark_Runner
What is modulo and benefit in uses
05-12-2008, 09:31 AM#2
Alexander244
It gives the remainder of a division; multiple uses.
05-12-2008, 10:00 AM#3
Tide-Arc Ephemera
Well expanding on what he said;

15 mod 4 would give you 3. (15/4 = 12, remainder 3)

Modulo's seemingly main use is to determine if a number is odd or even.
05-12-2008, 10:45 AM#4
abriko
I'm using modulo to do multiple actions into a periodic trigger.
For example, i want to do an action every of 1s and a different one every 3s.
I create 1 trigger with Periodic Timer at 1s. I add the first action, and for the second one under a If :
If
Trigger execution count module 3 = 0
Then
Do the second action.