mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
Merge pull request #927 from sapics/minor-minifier
Simplify calculation in PathFitter
This commit is contained in:
commit
87e6c0f2c3
1 changed files with 2 additions and 3 deletions
|
@ -99,9 +99,8 @@ var PathFitter = Base.extend({
|
|||
maxError = max.error;
|
||||
}
|
||||
// Fitting failed -- split at max error point and fit recursively
|
||||
var V1 = this.points[split - 1].subtract(this.points[split]),
|
||||
V2 = this.points[split].subtract(this.points[split + 1]),
|
||||
tanCenter = V1.add(V2).divide(2).normalize();
|
||||
var tanCenter = this.points[split - 1].subtract(this.points[split + 1])
|
||||
.normalize();
|
||||
this.fitCubic(first, split, tan1, tanCenter);
|
||||
this.fitCubic(split, last, tanCenter.negate(), tan2);
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue