mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
Use correct term for curve parameter renormalization.
This commit is contained in:
parent
085cdd74a2
commit
a0730756c1
2 changed files with 4 additions and 4 deletions
|
@ -1327,9 +1327,9 @@ new function() { // Scope for intersection using bezier fat-line clipping
|
||||||
&& t1 <= (param.endConnected ? tMax : 1)) {
|
&& t1 <= (param.endConnected ? tMax : 1)) {
|
||||||
if (t2 == null)
|
if (t2 == null)
|
||||||
t2 = Curve.getParameterOf(v2, p2.x, p2.y);
|
t2 = Curve.getParameterOf(v2, p2.x, p2.y);
|
||||||
var reparametrize = param.reparametrize;
|
var renormalize = param.renormalize;
|
||||||
if (reparametrize) {
|
if (renormalize) {
|
||||||
var res = reparametrize(t1, t2);
|
var res = renormalize(t1, t2);
|
||||||
t1 = res[0];
|
t1 = res[0];
|
||||||
t2 = res[1];
|
t2 = res[1];
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,7 +111,7 @@ var PathItem = Item.extend(/** @lends PathItem# */{
|
||||||
startConnected: length1 === 1 && p1.equals(p2),
|
startConnected: length1 === 1 && p1.equals(p2),
|
||||||
// After splitting, the end is always connected:
|
// After splitting, the end is always connected:
|
||||||
endConnected: true,
|
endConnected: true,
|
||||||
reparametrize: function(t1, t2) {
|
renormalize: function(t1, t2) {
|
||||||
// Since the curve was split above, we need to
|
// Since the curve was split above, we need to
|
||||||
// adjust the parameters for both locations.
|
// adjust the parameters for both locations.
|
||||||
return [t1 / 2, (1 + t2) / 2];
|
return [t1 / 2, (1 + t2) / 2];
|
||||||
|
|
Loading…
Reference in a new issue