fix calculation sum column (теперь точно все работает)
This commit is contained in:
parent
a3d4b24e09
commit
25f3f16cf4
@ -53,14 +53,16 @@ namespace EvoCalculator.Core.Calculation.Columns
|
||||
var DIFFICULT_CASE = _percentPaymentColumn.Values.Take(_percentPaymentColumn.Values.Length - 1)
|
||||
.Any(x => x < 3 && x > 0);
|
||||
|
||||
var NUMBER_OF_RATHER_50 = _percentPaymentColumn.Values
|
||||
.Skip(2)
|
||||
.Take(_percentPaymentColumn.Values.Length - 1)
|
||||
.Where(x => x >= 10).ToArray().Length;
|
||||
|
||||
var goalSeek = new GoalSeek(this);
|
||||
goalSeek.SeekResult(requiredValue,
|
||||
new GoalSeekOptions(
|
||||
startingStabPoint:
|
||||
(_postValues.BaseCost.Value - _preparedValues.FirstPaymentSum) /
|
||||
(_preparedValues.Nmper - 3) * (DIFFICULT_CASE
|
||||
? 0.1m
|
||||
: 1m)
|
||||
(_postValues.BaseCost.Value - _preparedValues.FirstPaymentSum) / NUMBER_OF_RATHER_50
|
||||
, maximumAttempts: 1000
|
||||
, initialTineSpacing: DIFFICULT_CASE ? 10000m : 1000m
|
||||
// , focusPercentage: 50
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user