Tuesday, August 2, 2016

isrcbetweenl1andl2

for (var r = 0; r < window.innerHeight; r = r + 1) {
colortherow(r)}

function colortherow(r) {
for (c = 0; c < window.innerWidth; c = c + 1) {
if (isrcbetweenl1andl2(r,c) === "yes") {
colorthepixel(r,c,orange)}
else {colorthepixel(r,c,green)}}

function isrcbetweenl1andl2(r,c) {
if (l1.type === "v" || l2.type === "v") {return testforhorizontalbetweenness(r,c)}
else {return testforverticalbetweeness(r,c)}