16 lines
440 B
C++
16 lines
440 B
C++
#ifndef UNIT_H
|
|
#define UNIT_H
|
|
|
|
#include <QString>
|
|
#include <complex>
|
|
|
|
namespace Unit
|
|
{
|
|
double FromString(QString string, QString unit = QString(), QString prefixes = " ");
|
|
// prefixed need to be in ascending order (e.g. "m kMG" is okay, whjle "MkG" does not work)
|
|
QString ToString(double value, QString unit = QString(), QString prefixes = " ", int precision = 6);
|
|
double SIPrefixToFactor(char prefix);
|
|
};
|
|
|
|
#endif // UNIT_H
|