BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Implements class Unit.
Definition in file Unit.cpp.
Go to the source code of this file.
Functions | |
double | convert (double d, Unit from, Unit to) |
Convert the given value d from unit "from" to unit "to" Throws an exception if no conversion possible. More... | |
QString | unitAsString (const Unit &unit) |
Returns the string for the given unit. More... | |
Convert the given value d from unit "from" to unit "to" Throws an exception if no conversion possible.
Definition at line 20 of file Unit.cpp.
References angstrom, angstrom2, angstromMinus2, degree, nanometer, nanometer2, nanometerMinus2, other, and radiant.
Referenced by DoubleSpinBox::toBaseValue(), and DoubleSpinBox::toDisplayValue().
QString unitAsString | ( | const Unit & | unit | ) |
Returns the string for the given unit.
Definition at line 58 of file Unit.cpp.
References angstrom, angstrom2, angstromMinus2, degree, nanometer, nanometer2, nanometerMinus2, other, radiant, and unitless.
Referenced by ParameterTreeBuilder::addDetector(), and DoubleSpinBox::displayUnitAsString().