mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
Fix curve evaluate function to finite
This commit is contained in:
parent
37e3ac7883
commit
8dfb5191fa
1 changed files with 4 additions and 2 deletions
|
@ -1087,8 +1087,10 @@ new function() { // Scope for methods that require private functions
|
|||
}
|
||||
// Now normalize x & y
|
||||
var len = Math.sqrt(x * x + y * y);
|
||||
x /= len;
|
||||
y /= len;
|
||||
if (len) {
|
||||
x /= len;
|
||||
y /= len;
|
||||
}
|
||||
}
|
||||
if (type === 3) {
|
||||
// Calculate 2nd derivative, and curvature from there:
|
||||
|
|
Loading…
Reference in a new issue