Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
drawCircle(p1: Vector, p2: Vector) {
const v = utils.diff(p1, p2);
const radius = v.length() / 2;
return new Path()
.moveTo(p1.x, p1.y)
.arc(-v.x, -v.y, radius, radius)
.arc(v.x, v.y, radius, radius)
.close();
},