Skip to content

Commit

Permalink
fixed a bug in Arc to Curve convertor
Browse files Browse the repository at this point in the history
  • Loading branch information
Preet Shihn authored and Preet Shihn committed May 12, 2018
1 parent 2850bd3 commit 3eb4dde
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dist/rough.js
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,8 @@ class RoughArcConverter {
var numerator = this._rx * this._rx * this._ry * this._ry - this._rx * this._rx * y1dash * y1dash - this._ry * this._ry * x1dash * x1dash;
if (numerator < 0) {
let s = Math.sqrt(1 - (numerator / (this._rx * this._rx * this._ry * this._ry)));
this._rx = s;
this._ry = s;
this._rx = this._rx * s;
this._ry = this._ry * s;
root = 0;
} else {
root = (largeArcFlag == sweepFlag ? -1.0 : 1.0) *
Expand Down
2 changes: 1 addition & 1 deletion dist/rough.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/rough.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,8 @@ class RoughArcConverter {
var numerator = this._rx * this._rx * this._ry * this._ry - this._rx * this._rx * y1dash * y1dash - this._ry * this._ry * x1dash * x1dash;
if (numerator < 0) {
let s = Math.sqrt(1 - (numerator / (this._rx * this._rx * this._ry * this._ry)));
this._rx = s;
this._ry = s;
this._rx = this._rx * s;
this._ry = this._ry * s;
root = 0;
} else {
root = (largeArcFlag == sweepFlag ? -1.0 : 1.0) *
Expand Down
2 changes: 1 addition & 1 deletion dist/rough.umd.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/path.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ export class RoughArcConverter {
var numerator = this._rx * this._rx * this._ry * this._ry - this._rx * this._rx * y1dash * y1dash - this._ry * this._ry * x1dash * x1dash;
if (numerator < 0) {
let s = Math.sqrt(1 - (numerator / (this._rx * this._rx * this._ry * this._ry)));
this._rx = s;
this._ry = s;
this._rx = this._rx * s;
this._ry = this._ry * s;
root = 0;
} else {
root = (largeArcFlag == sweepFlag ? -1.0 : 1.0) *
Expand Down

0 comments on commit 3eb4dde

Please sign in to comment.