Fix ray-casting-algorithm.rkt
Fix incorrect usage of variables
This commit is contained in:
parent
a25938f123
commit
2f9a91b740
1 changed files with 2 additions and 2 deletions
|
|
@ -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))])))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue