LibreVNA/Software/PC_Application/LibreVNA-GUI/unit.h

16 lines
439 B
C
Raw Normal View History

2022-10-01 23:10:44 +08:00
#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);
2022-10-24 02:34:20 +08:00
}
2022-10-01 23:10:44 +08:00
#endif // UNIT_H