Commit 2c987d64 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Rename local variabe to prevent misunderstandings

parent 95142a49
......@@ -174,11 +174,11 @@ deathBenefit.annuityDecreasing = function(interest) {
protectionPeriod = params$ContractData$policyPeriod - params$ContractData$deferralPeriod;
vk = 1/(1 + interest);
if (interest == 0) {
sumInsured = (protectionPeriod:0) / protectionPeriod
benefit = (protectionPeriod:0) / protectionPeriod
} else {
sumInsured = (vk ^ (protectionPeriod:0) - 1) / (vk ^ protectionPeriod - 1)
benefit = (vk ^ (protectionPeriod:0) - 1) / (vk ^ protectionPeriod - 1)
}
pad0(sumInsured, l = len)
pad0(benefit, l = len)
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment