• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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