Jump to content

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; AyBx=poly.ssp.yx
Py=point.?.y; BxAy=poly.sps.xy; By=poly.sp.y /* [↓] do a vertex swap.*/
if Ay>By then parse value Ax Ay Bx By with Bx By Ax Ay
if Py=Ay | Py=By then Py=Py + epsilon
Cookies help us deliver our services. By using our services, you agree to our use of cookies.