shadow$provide.module$node_modules$pixi_DOT_js$lib$scene$graphics$shared$buildCommands$buildArcTo = function(global, require, module, exports) {
  var buildArc = require("module$node_modules$pixi_DOT_js$lib$scene$graphics$shared$buildCommands$buildArc");
  "use strict";
  exports.buildArcTo = function(points, x1, y1, x2, y2, radius) {
    const a1 = points[points.length - 1] - y1, b1 = points[points.length - 2] - x1;
    y2 -= y1;
    x2 -= x1;
    var mm = Math.abs(a1 * x2 - b1 * y2);
    if (1e-8 > mm || 0 === radius) {
      points[points.length - 2] === x1 && points[points.length - 1] === y1 || points.push(x1, y1);
    } else {
      var dd = a1 * a1 + b1 * b1, cc = y2 * y2 + x2 * x2, tt = a1 * y2 + b1 * x2, k1 = radius * Math.sqrt(dd) / mm;
      mm = radius * Math.sqrt(cc) / mm;
      dd = k1 * tt / dd;
      cc = mm * tt / cc;
      tt = k1 * x2 + mm * b1;
      var cy = k1 * y2 + mm * a1;
      buildArc.buildArc(points, tt + x1, cy + y1, radius, Math.atan2(a1 * (mm + dd) - cy, b1 * (mm + dd) - tt), Math.atan2(y2 * (k1 + cc) - cy, x2 * (k1 + cc) - tt), b1 * y2 > x2 * a1);
    }
  };
};

//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$scene$graphics$shared$buildCommands$buildArcTo.js.map
