Skip to content

Commit

Permalink
Merge pull request #88 from leviat-tech/master
Browse files Browse the repository at this point in the history
Reverse arc direction when reflecting over a single axis
  • Loading branch information
alexbol99 authored May 15, 2021
2 parents adf355e + 42ef243 commit 878f75c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/classes/arc.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,11 @@ export class Arc {
let newStart = this.start.transform(matrix);
let newEnd = this.end.transform(matrix);
let newCenter = this.pc.transform(matrix);
let arc = Flatten.Arc.arcSE(newCenter, newStart, newEnd, this.counterClockwise);
let newDirection = this.counterClockwise;
if (matrix.a * matrix.d < 0) {
newDirection = !newDirection;
}
let arc = Flatten.Arc.arcSE(newCenter, newStart, newEnd, newDirection);
return arc;
}

Expand Down

0 comments on commit 878f75c

Please sign in to comment.