Quote:
Originally Posted by NS_Radication
What can this do? Could this be used to add a ball count to the robot.
|
This is called
modular arithmetic. You probably don't want to use that particular method for counting balls, because if, for example, your NUM_CHOICES were 3, then as balls enter the count would go 0,1,2,0,1,2, instead of 0,1,2,3,4 as they entered and 4,3,2,1,0 as they left.