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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user