Skip to content

Commit

Permalink
change rotation in radians
Browse files Browse the repository at this point in the history
  • Loading branch information
nanli-emory committed Apr 6, 2024
1 parent da54165 commit 6c3b244
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion common/DrawHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,16 @@ caDrawHelper.prototype.circle = function(ctx, point, radius, isPoint=true){
// return points and path
return path;
}

// rotation in radians
caDrawHelper.prototype.ellipse = function(ctx, point, radius, rotation){
const path = new Path();
path.ellipse(
point[0],
point[1],
radius[0],
radius[1],
rotation * Math.PI,
rotation,
0,
2 * Math.PI
);
Expand Down

0 comments on commit 6c3b244

Please sign in to comment.