mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-22 07:19:57 -05:00
Fix bug in singularity check.
This commit is contained in:
parent
ee7147d58e
commit
73a188742e
1 changed files with 1 additions and 1 deletions
|
@ -126,7 +126,7 @@ var PathFitter = Base.extend({
|
||||||
// Compute the determinants of C and X
|
// Compute the determinants of C and X
|
||||||
var det_C0_C1 = C[0][0] * C[1][1] - C[1][0] * C[0][1],
|
var det_C0_C1 = C[0][0] * C[1][1] - C[1][0] * C[0][1],
|
||||||
alpha_l, alpha_r;
|
alpha_l, alpha_r;
|
||||||
if (Math.abs(det_C0_C1) < Numerical.TOLERANCE) {
|
if (Math.abs(det_C0_C1) > Numerical.TOLERANCE) {
|
||||||
// Kramer's rule
|
// Kramer's rule
|
||||||
var det_C0_X = C[0][0] * X[1] - C[1][0] * X[0],
|
var det_C0_X = C[0][0] * X[1] - C[1][0] * X[0],
|
||||||
det_X_C1 = X[0] * C[1][1] - X[1] * C[0][1];
|
det_X_C1 = X[0] * C[1][1] - X[1] * C[0][1];
|
||||||
|
|
Loading…
Reference in a new issue