To explain my issue imagine i have some value (lets call it MyNumber) that starts from 0 and goes to 100 then resets back to 0
Where i am constantly adding 1 to it
I can loop it like that to cycle trough some range
I learned i could set it to cycle trough 0 to 200
And now i could do [tex]100-MyNumber[/tex] and so i would it would still add from 0 to 200 and reset
But it would start from 100,99,98,97,,2,1,0,-1,-2,,,,,-97,-98,-99,-100 and then back to 100
Now i could also go with
[tex]100-(MyNumber-100)[/tex]
And i would get it going from 200 to 0 then looping back to 200 and going to 0 again over and over
So i reversed the process of adding 1 to MyNumber and now it is subtracting 1 from my number
BUT now i can go with
[tex]100-(abs(MyNumber-100))[/tex]
Where abs returns value as absolute so no negative numbers basically removes -minus sign
And so i would get it going from 0 to 100 and drop back to 0
So 0,1,2,3,4,,,,98,99,100,99,98,97,,,3,2,1
And that is how instead of it going one way or another
I made it increase to its peak then decrease (yeah i lost half of it but i could simply x2 now)
Now i could shove in there [tex]100/100*MyNumber[/tex]
And here my problems starts
Imagine it is as climbing on the stairs
All that is done to MyNumber while it loops from 0 to 200 by constantly adding 1 to it
Where only thing that changes is result
And my general problem is not with how it works cause it works perfectly
My problem is with adding 1 to it
So imagine we add 1 each sec so its 100 sec one way and 100 other way
What i would wish to do is be able to manipulate evenly how much is added to MyNumber on both ways
I was able to achieve one part of it
Where it starts slowly and gradually decrease over 100 and then again start gaining speed by
[tex]1+(MyNumberCurrentValue/some number)[/tex]
And it is like starting at lowest speed (1/s) and the longer it goes the more it adds per second
Where when it reaches 100 it starts dropping amount of how much is added since MyNumber also starts to lose value
And i would wish to reverse that process
And do other things
To illustrate it
I wish to be able to do this

Or this
Or both
Any ideas are welcome

MENU