Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int hours = (int)hoursDecimal;
- decimal minutesDecimal = ((hoursDecimal - hours) * 60);
- int minutes = (int)minutesDecimal;
- int seconds = (int)((minutesDecimal - minutes) * 60);
- trunc(mod(dec, 1)) => hours
- trunc(mod(dec * 60, 60)) => minutes
- trunc(mod(dec * 3600, 60)) => seconds
- int seconds = (int) ((dec * 3600) % 60)
Add Comment
Please, Sign In to add comment