}
else // old section closed: check if we use first or last points...
{
- if((pmin < pmax) && ((std::abs(pmin - pfirst)> 1.e-3) && (std::abs(pmax - plast) >1.e-3))) // internal points forward
+ if((pmin < pmax) && ((std::fabs(pmin - pfirst)> 1.e-3) && (std::fabs(pmax - plast) >1.e-3))) // internal points forward
forward = true;
- else if ((pmin > pmax) && ((std::abs(pmin - plast)> 1.e-3) && (std::abs(pmax - pfirst) >1.e-3))) // internal points reverse
+ else if ((pmin > pmax) && ((std::fabs(pmin - plast)> 1.e-3) && (std::fabs(pmax - pfirst) >1.e-3))) // internal points reverse
{
pmin = p[1];
pmax = p[0];
forward = false;
}
- else if ((std::abs(pmin - plast) <1.e-3) && (p[2] < pmax)) // forward, replace pmin par pfirst
+ else if ((std::fabs(pmin - plast) <1.e-3) && (p[2] < pmax)) // forward, replace pmin par pfirst
pmin = pfirst;
- else if ((std::abs(pmin - plast) <1.e-3) && (p[2] > pmax)) // reverse
+ else if ((std::fabs(pmin - plast) <1.e-3) && (p[2] > pmax)) // reverse
{
pmin = p[1];
pmax = p[0];
forward = false;
}
- else if ((std::abs(pmax - pfirst) <1.e-3) && (p[2] < pmin)) // reverse
+ else if ((std::fabs(pmax - pfirst) <1.e-3) && (p[2] < pmin)) // reverse
{
pmin = p[1];
pmax = p[0];
forward = false;
}
- else if ((std::abs(pmax - pfirst) <1.e-3) && (p[2] > pmin)) // forward, replace pmax par plast
+ else if ((std::fabs(pmax - pfirst) <1.e-3) && (p[2] > pmin)) // forward, replace pmax par plast
pmax = plast;
}
DEBTRACE("forward: "<< forward << " pmin " << pmin << " pmax " << pmax);
Handle(HYDROData_Object) aNewZone1c = Handle(HYDROData_Object)::DownCast( aNewZone1 );
BRepGProp::SurfaceProperties(aNewZone1c->GetTopShape(), G1);
- double diff = abs(G1.Mass()-m); //there is still a difference after calling of general fuse on complicated cases
+ double diff = fabs(G1.Mass()-m); //there is still a difference after calling of general fuse on complicated cases
CPPUNIT_ASSERT(diff < 20.0);
CPPUNIT_ASSERT_DOUBLES_EQUAL(23387.2, G1.Mass(), 0.1);
CPPUNIT_ASSERT_DOUBLES_EQUAL(23370.1, m, 0.1);