lispdoc - results for round |
(round number &optional (divisor 1)) | Function: Rounds number (or number/divisor) to nearest integer. The second returned value is the remainder.
|
Example:(defun time-string (time) "Return a string representing this internal time in min:secs." (multiple-value-bind (min sec) (floor (round time internal-time-units-per-second) 60) (format nil "~2d:~2,'0d" min sec))) | Mentioned in: CLtL2 - 12.4. Arithmetic Operations CLtL2 - 12.6. Type Conversions and Component Extractions on Numbers CLtL2 - 4.8. Type Conversion Function HyperSpec - Function FLOOR, FFLOOR, CEILING, FCEILING, TRUNCATE, FTRUNCATE, ROUND, FROUND PCL - basic math Successful Lisp - chapter20 |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| By Bill Moorier |