Mercurial > hg > svgui
comparison 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 |
comparison
equal
deleted
inserted
replaced
1137:4e7ed3252d80 | 1138:998e31e92dbe |
---|---|
86 { | 86 { |
87 double maxPixF = m_maxPixel; | 87 double maxPixF = m_maxPixel; |
88 | 88 |
89 if (m_params.scaleType == ColourScaleType::Phase) { | 89 if (m_params.scaleType == ColourScaleType::Phase) { |
90 double half = (maxPixF - 1.f) / 2.f; | 90 double half = (maxPixF - 1.f) / 2.f; |
91 return 1 + int((value * half) / M_PI + half); | 91 int pixel = 1 + int((value * half) / M_PI + half); |
92 return pixel; | |
92 } | 93 } |
93 | 94 |
94 value *= m_params.gain; | 95 value *= m_params.gain; |
95 | 96 |
96 // value = pow(value, m_params.multiple); | 97 // value = pow(value, m_params.multiple); |