Created
November 2, 2018 16:37
-
-
Save felipecustodio/6b2d20473156dbe4b3d85faf40dd1442 to your computer and use it in GitHub Desktop.
increase / decrease a value smoothly after certain thresholds are met
This file contains hidden or 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
| if (thickness_flag) { | |
| thickness += 1; | |
| if (thickness >= 5) { | |
| thickness_flag = false; | |
| } | |
| } else { | |
| thickness -= 1; | |
| if (thickness <= 1) { | |
| thickness_flag = true; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment