fix: graph jitter on load + format

This commit is contained in:
2026-11-09 20:20:27 +01:00
parent d69a6bcafd
commit e49ecabf62
13 changed files with 181 additions and 320 deletions
@@ -41,8 +41,8 @@ qreal fromDev(qint64 device, qreal dpr) {
// points depending on floating point noise.
qreal snapCenterDev(qint64 sizeDev, qint64 widthDev) {
const double halfParity = (widthDev % 2) == 0 ? 0.0 : 0.5;
return std::floor(static_cast<double>(sizeDev) / 2.0 - halfParity)
+ halfParity;
return std::floor(static_cast<double>(sizeDev) / 2.0 - halfParity) +
halfParity;
}
qint64 snapAmplitude(qint64 widthDev, qreal multiplier) {