1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

Corrections made for OCCT 6.9.1.beta

- Graphic3d_Camera: comparison of real to zero by == is replaced by safer check against FLT_MIN (#25760)
- BRepBuilderAPI_Copy: new option copyMesh (#26458) is documented and made combinable with copyGeom
This commit is contained in:
abv
2015-09-03 09:51:15 +03:00
committed by bugmaster
parent 969d1cafab
commit 5c8908e0f0
3 changed files with 20 additions and 34 deletions

View File

@@ -50,11 +50,12 @@ namespace
// relative z-range tolerance compatible with for floating point.
static Standard_Real zEpsilon (const Standard_Real theValue)
{
if (theValue == 0)
Standard_Real anAbsValue = Abs (theValue);
if (anAbsValue <= (double)FLT_MIN)
{
return FLT_EPSILON;
return FLT_MIN;
}
Standard_Real aLogRadix = Log10 (Abs (theValue)) / Log10 (FLT_RADIX);
Standard_Real aLogRadix = Log10 (anAbsValue) / Log10 (FLT_RADIX);
Standard_Real aExp = Floor (aLogRadix);
return FLT_EPSILON * Pow (FLT_RADIX, aExp);
};