LibreVNA/Software/PC_Application/LibreVNA-GUI/unit.h
2022-10-23 20:34:20 +02:00

16 lines
439 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