How can one determine if a circle is inside another circle? I thought I had it figured out using isInside method.
Note: This code will run on http://sketch.paperjs.org
Expect Circle2 to be inside Circle1
var circle1 = new Path.Circle(new Point(100, 100), 100);
var circle2 = new Path.Circle(new Point(100, 100), 50);
circle1.strokeWidth = 2;
circle1.strokeColor = "black";
circle1.fillColor = "blue";
circle2.strokeWidth = 2;
circle2.strokeColor = "black";
circle2.fillColor = "green";
console.log(circle1.isInside(circle2));
console.log(circle2.isInside(circle1));
Outputs:
false false
From the docs isInside requires a rectangle object to be passed in as a parameter, not a path.
Working Code
Outputs: