Coding - Rework of Math global functions to stl (#833)

Majority of functions now simply call same functions from std namespace.
Functions that duplicate std namespace functionality are declared
deprecated.
Calls of deprecated functions are replaced with std functions calls.
This commit is contained in:
Dmitrii Kulikov
2025-11-17 14:20:24 +00:00
committed by GitHub
parent 1a246afa2e
commit c479f6e000
1205 changed files with 12672 additions and 11286 deletions
@@ -258,8 +258,8 @@ static void ScaleTangents(const TColgp_Array1OfPnt& PointsArray,
value[0] = value[1] = 0.0e0;
for (jj = 1; jj <= 3; jj++)
{
value[0] += Abs(TangentsArray.Value(ii).Coord(jj));
value[1] += Abs(eval_result[1][jj - 1]);
value[0] += std::abs(TangentsArray.Value(ii).Coord(jj));
value[1] += std::abs(eval_result[1][jj - 1]);
}
ratio = value[1] / value[0];
for (jj = 1; jj <= 3; jj++)
@@ -64,14 +64,14 @@ static void BuildParameters(const AppDef_MultiLine& theLine,
dist += aP2.SquareDistance(aP1);
}
dist = Sqrt(dist);
dist = std::sqrt(dist);
if (theParT == Approx_ChordLength)
{
thePars(i) = thePars(i - 1) + dist;
}
else
{ // Par == Approx_Centripetal
thePars(i) = thePars(i - 1) + Sqrt(dist);
thePars(i) = thePars(i - 1) + std::sqrt(dist);
}
}
for (i = firstP; i <= lastP; i++)
@@ -98,9 +98,9 @@ static void BuildPeriodicTangent(const AppDef_MultiLine& theLine,
return;
}
//
Standard_Integer i, nnpol, nnp = Min(nbpoints, 9);
Standard_Integer i, nnpol, nnp = std::min(nbpoints, 9);
nnpol = nnp;
Standard_Integer lastp = Min(lastpt, firstpt + nnp - 1);
Standard_Integer lastp = std::min(lastpt, firstpt + nnp - 1);
Standard_Real U;
AppParCurves_Constraint Cons = AppParCurves_TangencyPoint;
if (nnp <= 4)
@@ -139,7 +139,7 @@ static void BuildPeriodicTangent(const AppDef_MultiLine& theLine,
j += 3;
}
Standard_Integer firstp = Max(firstpt, lastpt - nnp + 1);
Standard_Integer firstp = std::max(firstpt, lastpt - nnp + 1);
if (firstp == firstpt && lastp == lastpt)
{
@@ -56,7 +56,7 @@ class Geom_BSplineSurface;
//! type of parametrization, which can be Approx_ChordLength, Approx_Centripetal
//! or Approx_IsoParametric. Default value is Approx_ChordLength.
//! For ChordLength parametrisation U(i) = U(i-1) + P(i).Distance(P(i-1)),
//! For Centripetal type U(i) = U(i-1) + Sqrt(P(i).Distance(P(i-1))).
//! For Centripetal type U(i) = U(i-1) + std::sqrt(P(i).Distance(P(i-1))).
//! Centripetal type can get better result for irregular distances between points.
//!
//! Approximation and interpolation algorithms can build periodical surface along U