Skip to content

Commit

Permalink
anglep: inline radians->int16 operation
Browse files Browse the repository at this point in the history
RADIANS->INT16 declares, that the argument is of the type ANGLE. Some
implementations when declared put check-type, and the type ANGLE is
declared as (SATISFIES ANGLEP). Then, ANGLEP called RADIANS->INT16
internally what lead to infinite recursion.
  • Loading branch information
dkochmanski committed Mar 5, 2020
1 parent ad7b404 commit 9e11c58
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dependent.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,9 @@

(defun anglep (x)
(and (typep x 'real)
(<= (* -360 64) (radians->int16 x) (* 360 64)))))
(<= (* -360 64)
(the int16 (round x #.(float (/ pi 180.0s0 64.0s0) 0.0s0)))
(* 360 64)))))


;;-----------------------------------------------------------------------------
Expand Down

0 comments on commit 9e11c58

Please sign in to comment.