Skip to content

Commit dbe9dff

Browse files
committed
fix num segments of circle
1 parent e99ca6a commit dbe9dff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shape/shapeToPoints.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function shapeToPointsRaw(shapeData) {
8383
const { radius, segment } = shapeData.circle;
8484
const points = [];
8585
const circumference = 2 * radius * Math.PI;
86-
const numSegments = Math.max(circumference * 2, 32);
86+
const numSegments = Math.min(circumference * 2, 64);
8787
for (let rad = 0; rad <= segment; rad += Math.PI * 2 / numSegments) {
8888
const x = Math.sin(rad) * radius;
8989
const y = -Math.cos(rad) * radius;

0 commit comments

Comments
 (0)