mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Prebuilt module for commit 6dd7cc5b6a
This commit is contained in:
parent
09c7c120d4
commit
22c8d922e3
5 changed files with 23 additions and 17 deletions
10
dist/docs/assets/js/paper.js
vendored
10
dist/docs/assets/js/paper.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat Sep 24 14:53:36 2016 -0400
|
||||
* Date: Sat Sep 24 15:39:09 2016 -0400
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -1046,8 +1046,10 @@ var Numerical = new function() {
|
|||
var fx = f(x),
|
||||
dx = fx / df(x),
|
||||
nx = x - dx;
|
||||
if (abs(dx) < tolerance)
|
||||
return nx;
|
||||
if (abs(dx) < tolerance) {
|
||||
x = nx;
|
||||
break;
|
||||
}
|
||||
if (fx > 0) {
|
||||
b = x;
|
||||
x = nx <= a ? (a + b) * 0.5 : nx;
|
||||
|
@ -1056,7 +1058,7 @@ var Numerical = new function() {
|
|||
x = nx >= b ? (a + b) * 0.5 : nx;
|
||||
}
|
||||
}
|
||||
return x;
|
||||
return clamp(x, a, b);
|
||||
},
|
||||
|
||||
solveQuadratic: function(a, b, c, roots, min, max) {
|
||||
|
|
10
dist/paper-core.js
vendored
10
dist/paper-core.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat Sep 24 14:53:36 2016 -0400
|
||||
* Date: Sat Sep 24 15:39:09 2016 -0400
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -1046,8 +1046,10 @@ var Numerical = new function() {
|
|||
var fx = f(x),
|
||||
dx = fx / df(x),
|
||||
nx = x - dx;
|
||||
if (abs(dx) < tolerance)
|
||||
return nx;
|
||||
if (abs(dx) < tolerance) {
|
||||
x = nx;
|
||||
break;
|
||||
}
|
||||
if (fx > 0) {
|
||||
b = x;
|
||||
x = nx <= a ? (a + b) * 0.5 : nx;
|
||||
|
@ -1056,7 +1058,7 @@ var Numerical = new function() {
|
|||
x = nx >= b ? (a + b) * 0.5 : nx;
|
||||
}
|
||||
}
|
||||
return x;
|
||||
return clamp(x, a, b);
|
||||
},
|
||||
|
||||
solveQuadratic: function(a, b, c, roots, min, max) {
|
||||
|
|
6
dist/paper-core.min.js
vendored
6
dist/paper-core.min.js
vendored
File diff suppressed because one or more lines are too long
10
dist/paper-full.js
vendored
10
dist/paper-full.js
vendored
|
@ -9,7 +9,7 @@
|
|||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Date: Sat Sep 24 14:53:36 2016 -0400
|
||||
* Date: Sat Sep 24 15:39:09 2016 -0400
|
||||
*
|
||||
***
|
||||
*
|
||||
|
@ -1046,8 +1046,10 @@ var Numerical = new function() {
|
|||
var fx = f(x),
|
||||
dx = fx / df(x),
|
||||
nx = x - dx;
|
||||
if (abs(dx) < tolerance)
|
||||
return nx;
|
||||
if (abs(dx) < tolerance) {
|
||||
x = nx;
|
||||
break;
|
||||
}
|
||||
if (fx > 0) {
|
||||
b = x;
|
||||
x = nx <= a ? (a + b) * 0.5 : nx;
|
||||
|
@ -1056,7 +1058,7 @@ var Numerical = new function() {
|
|||
x = nx >= b ? (a + b) * 0.5 : nx;
|
||||
}
|
||||
}
|
||||
return x;
|
||||
return clamp(x, a, b);
|
||||
},
|
||||
|
||||
solveQuadratic: function(a, b, c, roots, min, max) {
|
||||
|
|
4
dist/paper-full.min.js
vendored
4
dist/paper-full.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue