Index: Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsChartDataPointsFactory.cs =================================================================== diff -u -rd9119b8f4a74fb2a6f3ececeaea94f0e58513c52 -r85d231252d6f38f28043142c0e49216c23b7e562 --- Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsChartDataPointsFactory.cs (.../MacroStabilityInwardsChartDataPointsFactory.cs) (revision d9119b8f4a74fb2a6f3ececeaea94f0e58513c52) +++ Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsChartDataPointsFactory.cs (.../MacroStabilityInwardsChartDataPointsFactory.cs) (revision 85d231252d6f38f28043142c0e49216c23b7e562) @@ -478,17 +478,14 @@ yield break; } - int nrofInterPolatedPoints = nrOfPoints - 1; + int nrOfInterpolatedPoints = nrOfPoints - 1; + RoundedDouble deltaZ = endPoint - startPoint; - RoundedDouble deltaZBetweenPoints = nrOfPoints < 2 - ? (RoundedDouble) 0.0 - : (RoundedDouble) (deltaZ / nrofInterPolatedPoints); + var deltaZBetweenPoints = (RoundedDouble) (deltaZ / nrOfInterpolatedPoints); RoundedDouble z = startPoint; - int nrOfRepetitions = nrofInterPolatedPoints < 0 - ? 0 - : nrofInterPolatedPoints; - for (var i = 0; i < nrOfRepetitions + 1; i++) + + for (var i = 0; i < nrOfInterpolatedPoints + 1; i++) { yield return z; z += deltaZBetweenPoints;