function* plotLine(x0, y0, x1, y1) {
if (Math.abs(y1 - y0) < Math.abs(x1 - x0)) {
if (x0 > x1) yield* plotLineLow(x1, y1, x0, y0);
else yield* plotLineLow(x0, y0, x1, y1);
} else {
if (y0 > y1) yield* plotLineHigh(x1, y1, x0, y0);
else yield* plotLineHigh(x0, y0, x1, y1);
}
}