From 9e11c58d949fe662bf31f35e32fdca0ce45c8eb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Sun, 1 Mar 2020 12:14:07 +0100 Subject: [PATCH] anglep: inline radians->int16 operation 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. --- dependent.lisp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dependent.lisp b/dependent.lisp index 97c3fae..a697d9f 100644 --- a/dependent.lisp +++ b/dependent.lisp @@ -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))))) ;;-----------------------------------------------------------------------------