Browse files

Made OUTER-TRUNCATE a bit simpler to read (removed NIF statement).

  • Loading branch information...
1 parent 4684faa commit 2c7edd9eeb5f10d89e78a71a8e939700fbc18ef7 @smithzvk committed Aug 3, 2011
Showing with 2 additions and 4 deletions.
  1. +2 −4 misc.lisp
View
6 misc.lisp
@@ -455,10 +455,8 @@ Ex:
(chop-array vec length skip (+ start length skip) end) )))
(defun outer-truncate (x &optional (divisor 1))
- (nif x
- (1+ (truncate (/ x divisor)))
- 0
- (1- (truncate (/ x divisor))) ))
+ (let ((rat (/ x divisor)))
+ (* (sign rat) (ceiling (abs rat))) ))
(defun combine-pathnames (pn1 pn2)
(pathname (strcat (namestring pn1) (namestring pn2))) )

0 comments on commit 2c7edd9

Please sign in to comment.