rename variable for goal seek

This commit is contained in:
Chika 2020-12-01 19:28:26 +03:00
parent 70678977e9
commit 505b08fdf6

View File

@ -50,7 +50,7 @@ namespace EvoCalculator.Core.Calculation.Columns
public override void ComputeValues(decimal requiredValue)
{
var NUMBER_OF_RATHER_50 = _percentPaymentColumn.Values
var NUMBER_OF_LARGE_PERCENTS = _percentPaymentColumn.Values
.Skip(2)
.Take(_percentPaymentColumn.Values.Length - 1)
.Where(x => x >= 10).ToArray().Length;
@ -59,7 +59,7 @@ namespace EvoCalculator.Core.Calculation.Columns
goalSeek.SeekResult(requiredValue,
new GoalSeekOptions(
startingStabPoint:
(_postValues.BaseCost.Value - _preparedValues.FirstPaymentSum) / NUMBER_OF_RATHER_50
(_postValues.BaseCost.Value - _preparedValues.FirstPaymentSum) / NUMBER_OF_LARGE_PERCENTS
, maximumAttempts: 1000
, initialTineSpacing: (_postValues.BaseCost.Value - _preparedValues.FirstPaymentSum) / _preparedValues.Nmper
// , focusPercentage: 50