better NaN detection

This commit is contained in:
Stewart Allen 2021-05-31 22:02:36 -04:00
commit c45a35956c
2 changed files with 7 additions and 1 deletions

View file

@ -525,7 +525,9 @@
let e2 = arcQ[el-2]; // second last in arcQ
let e3 = arcQ[el-1]; // last in arcQ
let cc = BASE.util.center2d(e1, e2, e3, 1); // find center
if (isNaN(cc.x)) console.log({cc, e1, e2, e3});
if ([cc.x,cc.y,cc.z,cc.r].hasNaN()) {
console.log({cc, e1, e2, e3});
}
let dc = 0;
if (arcQ.length === 3) {
arcQ.center = [ cc ];