Mercurial > hg > svgui
diff layer/PianoScale.cpp @ 904:e0f08e108064 cxx11
Move to using double rather than float for floating-point calculations (float only for storage); more build fixes
author | Chris Cannam |
---|---|
date | Mon, 09 Mar 2015 12:02:10 +0000 |
parents | 8072264dc61f |
children | b66fb15de477 |
line wrap: on
line diff
--- a/layer/PianoScale.cpp Mon Mar 09 08:43:20 2015 +0000 +++ b/layer/PianoScale.cpp Mon Mar 09 12:02:10 2015 +0000 @@ -27,8 +27,8 @@ PianoScale::paintPianoVertical(View *v, QPainter &paint, QRect r, - float minf, - float maxf) + double minf, + double maxf) { int x0 = r.x(), y0 = r.y(), x1 = r.x() + r.width(), y1 = r.y() + r.height(); @@ -39,7 +39,7 @@ for (int i = 0; i < 128; ++i) { - float f = Pitch::getFrequencyForPitch(i); + double f = Pitch::getFrequencyForPitch(i); int y = lrintf(v->getYForFrequency(f, minf, maxf, true)); if (y < y0 - 2) break;