We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I would like to make a variable go up to a max number by a certain increment each time and then make it go back down to 0 by the same increment, and repeat. variable % maxNumber just floors the number at 0. I would like the number to be maxNumber - (variable % maxNumber) after variable > maxNumber until variable > maxNumber * 2, then I just want variable to be floored again to start the process over. I could use a "sin" function, but I don't like the way it curves. I also would rather not use "if" or "while" statements because it feels like cheating. I'm complicating this too much in my head, does anybody know how to do this?
Any help would be appreciated, thanks!