diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2021-01-20 09:54:03 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-01-20 09:54:03 -0800 |
commit | f4d806c77abf112a9fc6f87549e9e2346396e3f1 (patch) | |
tree | adec857fb85184a5533d178172b0a45dbe554f7b | |
parent | 29060feaa80ba85c7337a6661a7cacc929b1b934 (diff) | |
parent | 625fa139a919a52e4ad3fc61d5aa625bef37e2f2 (diff) | |
download | subsurface-f4d806c77abf112a9fc6f87549e9e2346396e3f1.tar.gz |
Merge branch 'tvalue'
-rw-r--r-- | stats/regressionitem.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stats/regressionitem.cpp b/stats/regressionitem.cpp index 362bf1fe1..9f176c6ae 100644 --- a/stats/regressionitem.cpp +++ b/stats/regressionitem.cpp @@ -45,12 +45,12 @@ void RegressionItem::updatePosition() for (int i = 0; i < num_samples; ++i) { double x = (maxX - minX) / (num_samples - 1) * static_cast<double>(i) + minX; poly << QPointF(xAxis->toScreen(x), - yAxis->toScreen(reg.a * x + reg.b + 2.0 * sqrt(reg.res2 / (reg.n - 2) * (1.0 / reg.n + (x - reg.xavg) * (x - reg.xavg) / (reg.n - 1) * (reg.n -2) / reg.sx2)))); + yAxis->toScreen(reg.a * x + reg.b + 1.960 * sqrt(reg.res2 / (reg.n - 2) * (1.0 / reg.n + (x - reg.xavg) * (x - reg.xavg) / (reg.n - 1) * (reg.n -2) / reg.sx2)))); } for (int i = num_samples - 1; i >= 0; --i) { double x = (maxX - minX) / (num_samples - 1) * static_cast<double>(i) + minX; poly << QPointF(xAxis->toScreen(x), - yAxis->toScreen(reg.a * x + reg.b - 2.0 * sqrt(reg.res2 / (reg.n - 2) * (1.0 / reg.n + (x - reg.xavg) * (x - reg.xavg) / (reg.n - 1) * (reg.n -2) / reg.sx2)))); + yAxis->toScreen(reg.a * x + reg.b - 1.960 * sqrt(reg.res2 / (reg.n - 2) * (1.0 / reg.n + (x - reg.xavg) * (x - reg.xavg) / (reg.n - 1) * (reg.n -2) / reg.sx2)))); } QPolygonF linePolygon; linePolygon.reserve(2); |