Interpolation with test done

This commit is contained in:
Иван Ивашкин
2024-10-31 17:35:31 +05:00
parent 96b0fbd6a3
commit bcea9639f6
12 changed files with 130 additions and 24 deletions

View File

@@ -35,6 +35,9 @@ namespace StructureHelperCommon.Models.Functions.Decorator
{
var graphSettings = base.GetGraphSettings();
var graphLimitGraphPoint = new List<GraphPoint>();
var leftPoint = new GraphPoint(leftBound, GetByX(leftBound));
var rightPoint = new GraphPoint(rightBound, GetByX(rightBound));
graphLimitGraphPoint.Add(leftPoint);
foreach (GraphPoint point in graphSettings.GraphPoints)
{
if (point.X > leftBound && point.X < rightBound)
@@ -42,6 +45,7 @@ namespace StructureHelperCommon.Models.Functions.Decorator
graphLimitGraphPoint.Add(point);
}
}
graphLimitGraphPoint.Add(rightPoint);
graphSettings.GraphPoints = graphLimitGraphPoint;
return graphSettings;
}

View File

@@ -36,6 +36,9 @@ namespace StructureHelperCommon.Models.Functions.Decorator
{
var graphSettings = base.GetGraphSettings();
var graphLimitGraphPoint = new List<GraphPoint>();
var downPoint = new GraphPoint(downBound, GetByX(downBound));
var upPoint = new GraphPoint(upBound, GetByX(upBound));
graphLimitGraphPoint.Add(downPoint);
foreach (GraphPoint point in graphSettings.GraphPoints)
{
if (point.Y > downBound && point.Y < upBound)
@@ -43,6 +46,7 @@ namespace StructureHelperCommon.Models.Functions.Decorator
graphLimitGraphPoint.Add(point);
}
}
graphLimitGraphPoint.Add(upPoint);
graphSettings.GraphPoints = graphLimitGraphPoint;
return graphSettings;
}