code: function edge(a, b) {
    if (a.row > b.row) { var t = a; a = b; b = t; }
    return {
      x0: a.column,
      y0: a.row,
      x1: b.column,
      y1: b.row,
      dx: b.column - a.column,
      dy: b.row - a.row
    };
  }
docs: scan-line conversion