Fix ray-casting-algorithm.rkt

Fix incorrect usage of variables
This commit is contained in:
David Suckstorff 2015-02-01 20:11:29 -05:00
parent a25938f123
commit 2f9a91b740

View file

@ -27,11 +27,11 @@
[(> Px (max Ax Bx)) #f]
[(< Px (min Ax Bx)) #t]
[else
(let ([red (if (neq? Ax Px)
(let ([red (if (neq? Ax Bx)
(/ (- By Ay) (- Bx Ax))
+inf.0)]
[blue (if (neq? Ax Px)
(/ (- Py Ax) (- Px Ax))
(/ (- Py Ay) (- Px Ax))
+inf.0)])
(if (>= blue red) #t #f))])))