Mercurial > hg > svgui
diff layer/ColourScale.cpp @ 1138:998e31e92dbe spectrogram-minor-refactor
Restore phase display
author | Chris Cannam |
---|---|
date | Thu, 04 Aug 2016 14:02:56 +0100 |
parents | 4e7ed3252d80 |
children | c53ed1a6fcbd |
line wrap: on
line diff
--- a/layer/ColourScale.cpp Thu Aug 04 11:26:11 2016 +0100 +++ b/layer/ColourScale.cpp Thu Aug 04 14:02:56 2016 +0100 @@ -88,7 +88,8 @@ if (m_params.scaleType == ColourScaleType::Phase) { double half = (maxPixF - 1.f) / 2.f; - return 1 + int((value * half) / M_PI + half); + int pixel = 1 + int((value * half) / M_PI + half); + return pixel; } value *= m_params.gain;