function _iterableToArray(iter) {
            if (
              Symbol.iterator in Object(iter) ||
              Object.prototype.toString.call(iter) === '[object Arguments]'
            )
              return Array.from(iter);
          }
This function does 3 things:

  1. Bounds the desired start/stop angles for an arc (in radians) so that:

         0 <= start < TWO_PI ;    start <= stop < start + TWO_PI

     This means that the arc rendering functions don't have to be concerned
     with what happens if stop is smaller than start, or if the arc 'goes
     round more than once', etc.: they can just start at start and increase
     until stop and the correct arc will be drawn.

  2. Optionally adjusts the angles within each quadrant to counter the naive
     scaling of the underlying ellipse up from the unit circle.  Without
     this, the angles become arbitrary when width != height: 45 degrees
     might be drawn at 5 degrees on a 'wide' ellipse, or at 85 degrees on
     a 'tall' ellipse.

  3. Flags up when start and stop correspond to the same place on the
     underlying ellipse.  This is useful if you want to do something special
     there (like rendering a whole ellipse instead).