Ray-casting algorithm: Difference between revisions

Content added Content deleted
(If Px is equal or bigger than segment's maximum x, then it should return "false" because It is already checked that Py is below Bx and above Ax. And we assume that point cannot be on the segment)
Line 49: Line 49:
'''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'''
'''return''' false
'''return''' false
'''else'''
'''else'''