1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 11:19:10 +00:00

Provide some plFormat samples with floats/doubles

This commit is contained in:
2014-05-25 14:34:00 -07:00
parent d15f1557b6
commit 1a0420127c
4 changed files with 12 additions and 12 deletions

View File

@ -556,9 +556,9 @@ plString plFileSystem::ConvertFileSize(uint64_t size)
float decimal = static_cast<float>(last_div) / 1024.f;
// Kilobytes are so small that we only care about whole numbers
if (i < 1)
return plString::Format("%.0f %s", decimal, labels[i]);
return plFormat("{.0f} {}", decimal, labels[i]);
else
return plString::Format("%.2f %s", decimal, labels[i]);
return plFormat("{.2f} {}", decimal, labels[i]);
}
last_div = my_div;
}