aboutsummaryrefslogtreecommitdiffstats
path: root/src/excelant/testcases/org/apache/poi
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2017-09-16 08:28:38 +0000
committerDominik Stadler <centic@apache.org>2017-09-16 08:28:38 +0000
commit399381da8df5e6926bbc4cc4a51b3d0723c4a6c7 (patch)
treeafd5a45d5c70298ce70681e7d4f3277457eccb4e /src/excelant/testcases/org/apache/poi
parent0cfa1ede4cbc9c00d2f5d3946ae9f57a6dd74d48 (diff)
downloadpoi-399381da8df5e6926bbc4cc4a51b3d0723c4a6c7.tar.gz
poi-399381da8df5e6926bbc4cc4a51b3d0723c4a6c7.zip
Remove unnecessary local variables
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808518 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/excelant/testcases/org/apache/poi')
-rw-r--r--src/excelant/testcases/org/apache/poi/ss/examples/formula/CalculateMortgageFunction.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/excelant/testcases/org/apache/poi/ss/examples/formula/CalculateMortgageFunction.java b/src/excelant/testcases/org/apache/poi/ss/examples/formula/CalculateMortgageFunction.java
index f1c526bf9d..2e2e62bf81 100644
--- a/src/excelant/testcases/org/apache/poi/ss/examples/formula/CalculateMortgageFunction.java
+++ b/src/excelant/testcases/org/apache/poi/ss/examples/formula/CalculateMortgageFunction.java
@@ -77,11 +77,8 @@ public class CalculateMortgageFunction implements FreeRefFunction {
public double calculateMortgagePayment( double p, double r, double y ) {
double i = r / 12 ;
double n = y * 12 ;
-
- double principalAndInterest =
- p * (( i * Math.pow((1 + i),n ) ) / ( Math.pow((1 + i),n) - 1)) ;
-
- return principalAndInterest ;
+
+ return p * (( i * Math.pow((1 + i),n ) ) / ( Math.pow((1 + i),n) - 1));
}
/**
* Excel does not support infinities and NaNs, rather, it gives a #NUM! error in these cases