Menu
I am coding a volume slider for my WinAMP remote, and the volume goes up in 5% increments.
The problem is in if someone changes the volume on the client side to something that doesn’t end in a 5 or 0.
Basically, what I need to have, is a function that takes a number, and returns that number rounded to the nearest 5 or 0. I’m really bad at this kind of logic. Can anyone help?
Thanks!
Chris