mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-14 06:59:06 -04:00
Curve-line intersection fix
This commit is contained in:
parent
bec1a91812
commit
ac04029f6e
1 changed files with 1 additions and 1 deletions
|
@ -1460,7 +1460,7 @@ new function() { // Scope for methods that require numerical integration
|
||||||
// We do have a point on the infinite line. Check if it falls on
|
// We do have a point on the infinite line. Check if it falls on
|
||||||
// the line *segment*.
|
// the line *segment*.
|
||||||
if (point.x >= 0 && point.x <= rl2x){
|
if (point.x >= 0 && point.x <= rl2x){
|
||||||
var tl = Curve.getParameterOf(vl, point.x, point.y);
|
var tl = Curve.getParameterOf([0, 0, 0, 0, rl2x, 0, rl2x, 0], point.x, 0);
|
||||||
// Interpolate the parameter for the intersection on line.
|
// Interpolate the parameter for the intersection on line.
|
||||||
var t1 = flip ? tl : t,
|
var t1 = flip ? tl : t,
|
||||||
t2 = flip ? t : tl;
|
t2 = flip ? t : tl;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue