lispdoc - results for truncate |
(truncate number &optional (divisor 1)) | Function: Return number (or number/divisor) as an integer, rounded toward 0. The second returned value is the remainder.
|
Example:(defun deg->radians (deg) "Convert degrees and minutes to radians." (* (+ (truncate deg) (* (rem deg 1) 5/3)) pi 1/180)) | Mentioned in: CLtL2 - 12.4. Arithmetic Operations CLtL2 - 12.6. Type Conversions and Component Extractions on Numbers CLtL2 - 4.5. Type Specifiers That Specialize CLtL2 - 4.8. Type Conversion Function HyperSpec - Function FLOOR, FFLOOR, CEILING, FCEILING, TRUNCATE, FTRUNCATE, ROUND, FROUND On Lisp - Building Functions On Lisp - Functional Design On Lisp - How Macros Work PCL - basic math |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| By Bill Moorier |