dist/jspdf.node.debug.js
function createArc(radius, startAngle, endAngle, anticlockwise) {
    var EPSILON = 0.00001; // Roughly 1/1000th of a degree, see below        // normalize startAngle, endAngle to [-2PI, 2PI]

    var twoPI = Math.PI * 2;
    var startAngleN = startAngle;

    if (startAngleN < twoPI || startAngleN > twoPI) {
      startAngleN = startAngleN % twoPI;
    }

    var endAngleN = endAngle;

    if (endAngleN < twoPI || endAngleN > twoPI) {
      endAngleN = endAngleN % twoPI;
    } // Compute the sequence of arc curves, up to PI/2 at a time.        // Total arc angle is less than 2PI.


    var curves = [];
    var piOverTwo = Math.PI / 2.0; //var sgn = (startAngle < endAngle) ? +1 : -1; // clockwise or counterclockwise

    var sgn = anticlockwise ? -1 : +1;
    var a1 = startAngle;

    for (var totalAngle = Math.min(twoPI, Math.abs(endAngleN - startAngleN)); totalAngle > EPSILON;) {
      var a2 = a1 + sgn * Math.min(totalAngle, piOverTwo);
      curves.push(createSmallArc.call(this, radius, a1, a2));
      totalAngle -= Math.abs(a2 - a1);
      a1 = a2;
    }

    return curves;
  }
function createArc(radius, startAngle, endAngle, anticlockwise) {
    var EPSILON = 0.00001; // Roughly 1/1000th of a degree, see below        // normalize startAngle, endAngle to [-2PI, 2PI]

    var twoPI = Math.PI * 2;
    var startAngleN = startAngle;

    if (startAngleN < twoPI || startAngleN > twoPI) {
      startAngleN = startAngleN % twoPI;
    }

    var endAngleN = endAngle;

    if (endAngleN < twoPI || endAngleN > twoPI) {
      endAngleN = endAngleN % twoPI;
    } // Compute the sequence of arc curves, up to PI/2 at a time.        // Total arc angle is less than 2PI.


    var curves = [];
    var piOverTwo = Math.PI / 2.0; //var sgn = (startAngle < endAngle) ? +1 : -1; // clockwise or counterclockwise

    var sgn = anticlockwise ? -1 : +1;
    var a1 = startAngle;

    for (var totalAngle = Math.min(twoPI, Math.abs(endAngleN - startAngleN)); totalAngle > EPSILON;) {
      var a2 = a1 + sgn * Math.min(totalAngle, piOverTwo);
      curves.push(createSmallArc.call(this, radius, a1, a2));
      totalAngle -= Math.abs(a2 - a1);
      a1 = a2;
    }

    return curves;
  }
Return a array of objects that represent bezier curves which approximate the circular arc centered at the origin, from startAngle to endAngle (radians) with the specified radius.

Each bezier curve is an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.
@function createArc