Anonymous user
Ray-casting algorithm: Difference between revisions
m
→{{header|REXX}}: used a better over/under statement construct.
m (→{{header|REXX}}: added/changed comments and whitespace, optimized a function.) |
m (→{{header|REXX}}: used a better over/under statement construct.) |
||
Line 3,106:
intersect: procedure expose point. poly.; parse arg ?,s; sp=s + 1
epsilon= '1e' || (-digits() %2); infinity= "1e" || (digits() *2)
Px=point.?.x; Ax=poly.s.x;
Py=point.?.y;
if Ay>By then parse value Ax Ay Bx By with Bx By Ax Ay
if Py=Ay | Py=By then Py=Py + epsilon
|