Skip to content
Snippets Groups Projects
Commit b9ecbbdf authored by Andre Offringa's avatar Andre Offringa
Browse files

Task #1892: extra digit in RFI ratios

parent 797bf238
No related branches found
No related tags found
No related merge requests found
...@@ -48,11 +48,11 @@ std::string TimeFrequencyStatistics::FormatRatio(num_t ratio) ...@@ -48,11 +48,11 @@ std::string TimeFrequencyStatistics::FormatRatio(num_t ratio)
{ {
std::stringstream s; std::stringstream s;
if(ratio > 0.01) if(ratio > 0.01)
s << (round(ratio*1000.0)/10.0) << "%";
else if(ratio > 0.001)
s << (round(ratio*10000.0)/100.0) << "%"; s << (round(ratio*10000.0)/100.0) << "%";
else if(ratio > 0.0001) else if(ratio > 0.001)
s << (round(ratio*100000.0)/1000.0) << "%"; s << (round(ratio*100000.0)/1000.0) << "%";
else if(ratio > 0.0001)
s << (round(ratio*1000000.0)/10000.0) << "%";
else else
s << (ratio*100.0) << "%"; s << (ratio*100.0) << "%";
return s.str(); return s.str();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment