code: function scanTriangle(a, b, c, ymin, ymax, scanLine) {
    var ab = edge(a, b),
        bc = edge(b, c),
        ca = edge(c, a);
  
    // sort edges by y-length
    if (ab.dy > bc.dy) { var t = ab; ab = bc; bc = t; }
    if (ab.dy > ca.dy) { var t = ab; ab = ca; ca = t; }
    if (bc.dy > ca.dy) { var t = bc; bc = ca; ca = t; }
  
    // scan span! scan span!
    if (ab.dy) scanSpans(ca, ab, ymin, ymax, scanLine);
    if (bc.dy) scanSpans(ca, bc, ymin, ymax, scanLine);
  }
docs: scan-line conversion