diff options
author | Tomaž Vajngerl <quikee@gmail.com> | 2013-05-27 08:10:36 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2013-07-03 21:46:39 +0200 |
commit | c61a0a3394ac354288a6d183845f598a9b9ae32a (patch) | |
tree | 12998a546ec1e54f4292c3ae3ca0cceb87fed842 /chart2 | |
parent | e6a0cc2d6cb37bf4e04861173c7e55b307513778 (diff) |
Slight cleanup in polynomial curve calculation
Change-Id: Ifc1b923e633beedce9ad27847f3c5c1298ee812e
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/tools/PolynomialRegressionCurveCalculator.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx b/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx index b28d297ad3af..f5717ab0b333 100644 --- a/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx +++ b/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx @@ -77,9 +77,7 @@ void SAL_CALL PolynomialRegressionCurveCalculator::recalculateRegression( aPowers[j] += pow(x, j); } - aMatrix[ 0 * aNumberOfRows + aNumberOfPolyElements] += y; - - for (int j = 1; j < aNumberOfPolyElements; j++) { + for (int j = 0; j < aNumberOfPolyElements; j++) { aMatrix[j * aNumberOfRows + aNumberOfPolyElements] += pow(x, j) * y; } |