Anonymous user
Ray-casting algorithm: Difference between revisions
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
(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:
'''if''' Py < Ay '''or''' Py > By '''then'''
'''return''' false
'''else''' '''if''' Px >= max(Ax, Bx) '''then'''
'''return''' false
'''else'''
|