const correctness + std namespace fix

This commit is contained in:
korialis 2021-12-14 15:57:31 +01:00
parent 1b20698dfb
commit ff62e5273a
2 changed files with 4 additions and 4 deletions

View File

@ -609,7 +609,7 @@ public:
//safety checks
if (weightSum[i]>0)
newP=avgPos[i]/weightSum[i];
if (isnan(newP.X())||isnan(newP.Y())||isnan(newP.Z()))
if (std::isnan(newP.X())|| std::isnan(newP.Y())|| std::isnan(newP.Z()))
newP=poly_m.vert[i].P();
if ((newP-poly_m.vert[i].P()).Norm()>poly_m.bbox.Diag())
newP=poly_m.vert[i].P();

View File

@ -82,9 +82,9 @@ public:
assert (tp != 0);
assert (nz >= 0 && nz < 4);
v[0] = tp->cV(Tetra::VofF(nz, 0));
v[1] = tp->cV(Tetra::VofF(nz, 1));
v[2] = tp->cV(Tetra::VofF(nz, 2));
v[0] = tp->V(Tetra::VofF(nz, 0));
v[1] = tp->V(Tetra::VofF(nz, 1));
v[2] = tp->V(Tetra::VofF(nz, 2));
assert(v[0] != v[1] && v[1] != v[2]); //no degenerate faces