simplify float division to modulo operator

This commit is contained in:
Morilli 2024-09-05 07:14:27 +02:00
parent d9069ea2cc
commit c77486f88d
1 changed files with 1 additions and 3 deletions

View File

@ -184,9 +184,7 @@ namespace BizHawk.Client.EmuHawk
lvi[3] = $"{total}";
if (tsbViewStyle.SelectedIndex == 2)
{
int n = (int) (dataA.Length / 1024.0f);
float ncheck = dataA.Length / 1024.0f;
lvi[4] = $"of {(n == ncheck ? "" : "~")}{n} KBytes";
lvi[4] = $"of {(dataA.Length % 1024 == 0 ? "" : "~")}{dataA.Length / 1024} KBytes";
}
else
lvi[4] = $"of {dataA.Length} Bytes";