mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Merge pull request #962 from iconexperience/fix-issue-960
Fix for #960 - Shortcut Curve.evaluate() for t === 1
This commit is contained in:
commit
7c24fc916f
1 changed files with 2 additions and 2 deletions
|
@ -1338,8 +1338,8 @@ new function() { // Scope for methods that require private functions
|
|||
if (type === 0) {
|
||||
// type === 0: getPoint()
|
||||
// Calculate the curve point at parameter value t
|
||||
x = ((ax * t + bx) * t + cx) * t + p1x;
|
||||
y = ((ay * t + by) * t + cy) * t + p1y;
|
||||
x = t === 1 ? p2x : ((ax * t + bx) * t + cx) * t + p1x;
|
||||
y = t === 1 ? p2y : ((ay * t + by) * t + cy) * t + p1y;
|
||||
} else {
|
||||
// type === 1: getTangent()
|
||||
// type === 2: getNormal()
|
||||
|
|
Loading…
Reference in a new issue