Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. ;; Convert DM->second
  2. (defun dm-to-sec (x)
  3. (* (/ x 100.0) 60.0))
  4. ;; Convert DM->minutes
  5. (defun dm-to-min (x)
  6. (/ x 100.0))
  7. ;; Convert second->minutes
  8. (defun sec-to-min (x)
  9. (/ x 60.0))
  10. ;; second->minutes convert with m:s.# style format
  11. (defun sec-to-min-formatted (x)
  12. (let ((ms (multiple-value-list (truncate x 60.0))))
  13. (format t "~a : ~a " (car ms) (cadr ms))))
  14. ;; DM->minutes convert with m:s.# style format
  15. (defun dm-to-min-formatted (x)
  16. (sec-to-min-formatted (dm-to-sec x)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement