19#include <fmt/format.h>
28 return fmt::format(
"{}", l);
30 static const std::string numbers[] = {
"k",
"M",
"B",
"T",
"Qa",
"Qn",
"Sx",
"Sp",
"O",
31 "N",
"De",
"Ud",
"Dd",
"Td",
"Qd",
"Qi",
"Sd"};
32 int exponent =
static_cast<int>(log10(abs(l)) / 3);
35 double d =
static_cast<double>(l) / pow(10, exponent * 3);
38 const int precision = 100;
39 d = round(d * precision) / precision;
41 return fmt::format(
"{} {}", d, numbers[exponent - 1]);
std::string LongToHumanString(int64_t l)
Definition: utilnumberdisplay.h:26
When adding assets, it is extremely crucial that you read cqsp::asset::AssetLoader::LoadResources to ...
Definition: clientctx.h:21