mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
Coding - Apply .clang-format formatting #286
Update empty method guards to new style with regex (see PR). Used clang-format 18.1.8. New actions to validate code formatting is added. Update .clang-format with disabling of include sorting. It is temporary changes, then include will be sorted. Apply formatting for /src and /tools folder. The files with .hxx,.cxx,.lxx,.h,.pxx,.hpp,*.cpp extensions.
This commit is contained in:
@@ -20,54 +20,47 @@
|
||||
#include <Law_Linear.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(Law_Linear,Law_Function)
|
||||
IMPLEMENT_STANDARD_RTTIEXT(Law_Linear, Law_Function)
|
||||
|
||||
Law_Linear::Law_Linear ()
|
||||
: valdeb(0.0),
|
||||
valfin(0.0),
|
||||
pdeb(0.0),
|
||||
pfin(0.0)
|
||||
Law_Linear::Law_Linear()
|
||||
: valdeb(0.0),
|
||||
valfin(0.0),
|
||||
pdeb(0.0),
|
||||
pfin(0.0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void Law_Linear::Set (const Standard_Real Pdeb,
|
||||
const Standard_Real Valdeb,
|
||||
const Standard_Real Pfin,
|
||||
const Standard_Real Valfin)
|
||||
void Law_Linear::Set(const Standard_Real Pdeb,
|
||||
const Standard_Real Valdeb,
|
||||
const Standard_Real Pfin,
|
||||
const Standard_Real Valfin)
|
||||
{
|
||||
pdeb = Pdeb;
|
||||
pfin = Pfin;
|
||||
pdeb = Pdeb;
|
||||
pfin = Pfin;
|
||||
valdeb = Valdeb;
|
||||
valfin = Valfin;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Continuity
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
GeomAbs_Shape Law_Linear::Continuity() const
|
||||
//=================================================================================================
|
||||
|
||||
GeomAbs_Shape Law_Linear::Continuity() const
|
||||
{
|
||||
return GeomAbs_CN;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : NbIntervals
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
//Standard_Integer Law_Linear::NbIntervals(const GeomAbs_Shape S) const
|
||||
Standard_Integer Law_Linear::NbIntervals(const GeomAbs_Shape ) const
|
||||
//=================================================================================================
|
||||
|
||||
// Standard_Integer Law_Linear::NbIntervals(const GeomAbs_Shape S) const
|
||||
Standard_Integer Law_Linear::NbIntervals(const GeomAbs_Shape) const
|
||||
{
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Intervals
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
//=================================================================================================
|
||||
|
||||
void Law_Linear::Intervals(TColStd_Array1OfReal& T,
|
||||
// const GeomAbs_Shape S) const
|
||||
const GeomAbs_Shape ) const
|
||||
// const GeomAbs_Shape S) const
|
||||
const GeomAbs_Shape) const
|
||||
{
|
||||
T.SetValue(T.Lower(), pdeb);
|
||||
T.SetValue(T.Upper(), pfin);
|
||||
@@ -75,48 +68,39 @@ void Law_Linear::Intervals(TColStd_Array1OfReal& T,
|
||||
|
||||
Standard_Real Law_Linear::Value(const Standard_Real X)
|
||||
{
|
||||
return ((X-pdeb)*valfin + (pfin-X)*valdeb)/(pfin-pdeb);
|
||||
return ((X - pdeb) * valfin + (pfin - X) * valdeb) / (pfin - pdeb);
|
||||
}
|
||||
|
||||
void Law_Linear::D1(const Standard_Real X,
|
||||
Standard_Real& F,
|
||||
Standard_Real& D)
|
||||
void Law_Linear::D1(const Standard_Real X, Standard_Real& F, Standard_Real& D)
|
||||
{
|
||||
F = ((X-pdeb)*valfin + (pfin-X)*valdeb)/(pfin-pdeb);
|
||||
D = (valfin-valdeb)/(pfin-pdeb);
|
||||
F = ((X - pdeb) * valfin + (pfin - X) * valdeb) / (pfin - pdeb);
|
||||
D = (valfin - valdeb) / (pfin - pdeb);
|
||||
}
|
||||
void Law_Linear::D2(const Standard_Real X,
|
||||
Standard_Real& F,
|
||||
Standard_Real& D,
|
||||
Standard_Real& D2)
|
||||
|
||||
void Law_Linear::D2(const Standard_Real X, Standard_Real& F, Standard_Real& D, Standard_Real& D2)
|
||||
{
|
||||
F = ((X-pdeb)*valfin + (pfin-X)*valdeb)/(pfin-pdeb);
|
||||
D = (valfin-valdeb)/(pfin-pdeb);
|
||||
F = ((X - pdeb) * valfin + (pfin - X) * valdeb) / (pfin - pdeb);
|
||||
D = (valfin - valdeb) / (pfin - pdeb);
|
||||
D2 = 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Trim
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
//=================================================================================================
|
||||
|
||||
Handle(Law_Function) Law_Linear::Trim(const Standard_Real PFirst,
|
||||
const Standard_Real PLast,
|
||||
// const Standard_Real Tol) const
|
||||
const Standard_Real ) const
|
||||
Handle(Law_Function) Law_Linear::Trim(const Standard_Real PFirst,
|
||||
const Standard_Real PLast,
|
||||
// const Standard_Real Tol) const
|
||||
const Standard_Real) const
|
||||
{
|
||||
Handle(Law_Linear) l = new (Law_Linear)();
|
||||
Standard_Real Vdeb, Vfin;
|
||||
Vdeb = (( PFirst-pdeb)*valfin + (pfin-PFirst)*valdeb)/(pfin-pdeb);
|
||||
Vfin = (( PLast-pdeb)*valfin + (pfin-PLast)*valdeb)/(pfin-pdeb);
|
||||
Standard_Real Vdeb, Vfin;
|
||||
Vdeb = ((PFirst - pdeb) * valfin + (pfin - PFirst) * valdeb) / (pfin - pdeb);
|
||||
Vfin = ((PLast - pdeb) * valfin + (pfin - PLast) * valdeb) / (pfin - pdeb);
|
||||
l->Set(PFirst, Vdeb, PLast, Vfin);
|
||||
|
||||
return l;
|
||||
}
|
||||
|
||||
|
||||
void Law_Linear::Bounds(Standard_Real& PFirst,
|
||||
Standard_Real& PLast)
|
||||
void Law_Linear::Bounds(Standard_Real& PFirst, Standard_Real& PLast)
|
||||
{
|
||||
PFirst = pdeb;
|
||||
PLast = pfin;
|
||||
|
Reference in New Issue
Block a user