Ray-casting algorithm: Difference between revisions

Content added Content deleted
Line 1,697: Line 1,697:
function west(A, B, x, y) {
function west(A, B, x, y) {
if (A.y <= B.y) {
if (A.y <= B.y) {
if (y < A.y || y > B.y ||
if (y <= A.y || y > B.y ||
x >= A.x && x >= B.x) {
x >= A.x && x >= B.x) {
return false;
return false;