I had a requirement to round the time for a video (in seconds) to the nearest 30 seconds. Not being so strong in math, I am grateful to be better at Googling. So here it is for anyone else in a similar situation:
Math.round(myTime/30)*30
Awesome and simple!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment