Ray-casting algorithm: Difference between revisions

Content added Content deleted
m (→‎{{header|Tcl}}: trying to fix, noticed that the bug is not only about the ray passing on a vertex... hm)
m (inverted the logic when modified A below B and viceversa; fixed)
Line 44: Line 44:
Py ← Py + ε
Py ← Py + ε
'''end''' '''if'''
'''end''' '''if'''
'''if''' Py > Ay '''or''' Py < By '''then'''
'''if''' Py < Ay '''or''' Py > By '''then'''
'''return''' false
'''return''' false
'''else''' '''if''' Px > max(Ax, Bx) '''then'''
'''else''' '''if''' Px > max(Ax, Bx) '''then'''