View Single Post
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-23-2017 , 02:19   Re: ConvertFloatToSeconds Stock (Useful for Songs)
Reply With Quote #9

@ddhoward, going from duration to hours, minutes, and seconds can be done more elegantly without any subtraction or multiplication:

Code:
new iDays= iDuration / 86400
new iHours = iDuration % 86400 / 3600
new iMinutes = iDuration % 3600 / 60
new iSeconds = iDuration % 60
__________________
fysiks is offline