mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
Define default value of t = 0.5 in Curve.subdivide().
This commit is contained in:
parent
7c57324b3a
commit
5581eefd0c
1 changed files with 2 additions and 0 deletions
|
@ -504,6 +504,8 @@ var Curve = this.Curve = Base.extend({
|
|||
},
|
||||
|
||||
subdivide: function(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {
|
||||
if (t === undefined)
|
||||
t = 0.5;
|
||||
var u = 1 - t,
|
||||
// Interpolate from 4 to 3 points
|
||||
p3x = u * p1x + t * c1x,
|
||||
|
|
Loading…
Reference in a new issue