• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Just an interesting idea related to indexing

Status
Not open for further replies.
Level 10
Joined
Sep 21, 2007
Messages
517
When indexing, instead of using the casual if/then/else, why not incorporate Modulus to increase efficiency. So for example, if the index limit is 12,
JASS:
CurrentIndex + 1 = x (Mod 12)
. Then we solve for x; the only problem im seeing is that we probably need an if/then statement to reset the previous indexes.

Hope this may be used usefully oneday for Indexing systems rather than only hours of a clock.
 
Status
Not open for further replies.
Top