Help with min-max
Posted: Sun Jul 29, 2012 8:15 pm
I want a variable to add up to 5 slowly but using min and max. I tried
and
I can't quite figure it out. I learned it a while back, but forgot it as time passed
- Code: Select all
spd+=min(0, max(spd, 5));
and
- Code: Select all
spd+=min(1, max(0, 5));
I can't quite figure it out. I learned it a while back, but forgot it as time passed