Last active
November 7, 2017 06:48
-
-
Save davebrny/65e1e8dc9784b85d352c26ef184f9d32 to your computer and use it in GitHub Desktop.
(autohotkey) - keep a number within a certain range when adding/subtracting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
counter_reset(number, min, max) { | |
if (number < min) | |
return max | |
else if (number > max) | |
return min | |
else return number | |
} | |
/* | |
[script info] | |
description = keep a number within a certain range when adding/subtracting | |
*/ |
Author
davebrny
commented
Jan 24, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment