mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
Ref T125, human readable file size
This commit is contained in:
committed by
Mathew Sutcliffe
parent
8c032fb4d7
commit
53189eafd5
@@ -51,6 +51,11 @@ namespace BlackMisc
|
||||
return rv;
|
||||
}
|
||||
|
||||
QString CMathUtils::roundAsString(double value, int digits)
|
||||
{
|
||||
return QString::number(round(value, digits));
|
||||
}
|
||||
|
||||
double CMathUtils::roundEpsilon(double value, double epsilon)
|
||||
{
|
||||
if (epsilon == 0) { return value; } // avoid division by 0
|
||||
|
||||
@@ -50,6 +50,9 @@ namespace BlackMisc
|
||||
//! Utility round method
|
||||
static double round(double value, int digits);
|
||||
|
||||
//! Utility round method, returning as string
|
||||
static QString roundAsString(double value, int digits);
|
||||
|
||||
//! Round by given epsilon
|
||||
static double roundEpsilon(double value, double epsilon);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user