Anonymous user
Ray-casting algorithm: Difference between revisions
m
a slightly better pseudo (correction for the vertex problem), and a typo fix (By instead of B)
m (→{{header|C}}: removed old-work comments; alignment of \ into define) |
m (a slightly better pseudo (correction for the vertex problem), and a typo fix (By instead of B)) |
||
Line 41:
B : the end-point of the segment with the greatest y coordinate
(B must be "above" A)
'''if''' Py
Py ← Py + ε
'''end''' '''if'''
'''if''' Py > Ay '''or''' Py < By '''then'''
'''return''' false
'''else''' '''if''' Px > max(Ax, Bx) '''then'''
Line 67 ⟶ 70:
'''end''' '''if'''
(
|