code: function flipCoords(x1, y1, x2, y2) //{{{
        {
          var xa = x1,
              xb = x2,
              ya = y1,
              yb = y2;
          if (x2 < x1) {
            xa = x2;
            xb = x1;
          }
          if (y2 < y1) {
            ya = y2;
            yb = y1;
          }
          return [xa, ya, xb, yb];
        }
docs: }}}