Merge branch 'animesh' of git://github.com/Shyotl/SingularityViewer

# Conflicts:
#	indra/llcommon/llstring.h
#	indra/newview/llviewermenu.cpp
#	indra/newview/llviewerregion.cpp
This commit is contained in:
Lirusaito
2019-03-18 17:30:34 -04:00
101 changed files with 7625 additions and 2526 deletions

View File

@@ -866,6 +866,26 @@ std::string LLStringOps::getDatetimeCode(const std::string& key)
}
std::string LLStringOps::getReadableNumber(F64 num)
{
if (fabs(num)>=1e9)
{
return llformat("%.2lfB", num / 1e9);
}
else if (fabs(num)>=1e6)
{
return llformat("%.2lfM", num / 1e6);
}
else if (fabs(num)>=1e3)
{
return llformat("%.2lfK", num / 1e3);
}
else
{
return llformat("%.2lf", num);
}
}
namespace LLStringFn
{
// NOTE - this restricts output to ascii