1 (define-module (dungeon-master geom)
2 #:use-module (dungeon-master geom point)
6 (define (angle-sign center a b)
7 "Return the sign of (- (atan (- a center))
9 (let ((x1 (- (point-x a) (point-x center)))
10 (y1 (- (point-y a) (point-y center)))
11 (x2 (- (point-x b) (point-x center)))
12 (y2 (- (point-y b) (point-y center))))
13 (cond ((and (>= x1 0) (< x2 0))
15 ((and (>= x2 0) (< x1 0))
17 ((and (= x1 0) (= x2 0))
20 (if (> (- (* x2 y1) (* x1 y2)) 0) 1 -1)))))