Fix savings calculation.

This commit is contained in:
Martijn Courteaux 2024-05-21 15:25:23 +02:00
parent 8983e14e18
commit 73f09de29d

View File

@ -968,7 +968,7 @@ void View::DrawCompare()
TextFocused( "Savings:", TimeToString( total1 * adj1 - total0 * adj0 ) );
ImGui::SameLine();
char buf[64];
PrintStringPercent( buf, ( total0 * adj0 ) / ( total1 * adj1 ) * 100 );
PrintStringPercent( buf, (1.0 - ( total0 * adj0 ) / ( total1 * adj1 )) * 100 );
TextDisabledUnformatted( buf );
TextFocused( "Max counts:", cumulateTime ? TimeToString( maxVal ) : RealToString( floor( maxVal ) ) );