| 67 | } |
| 68 | |
| 69 | static std::string setWithPrecision( |
| 70 | const std::string& name, |
| 71 | const double value, |
| 72 | const Unit unit, |
| 73 | const int precision |
| 74 | ) |
| 75 | { |
| 76 | UnitsApi::setSchema(name); |
| 77 | Quantity quantity {value, unit}; |
| 78 | QuantityFormat format = quantity.getFormat(); |
| 79 | format.setPrecision(precision); |
| 80 | quantity.setFormat(format); |
| 81 | return quantity.getSafeUserString(); |
| 82 | } |
| 83 | |
| 84 | static std::string setWithDenominator( |
| 85 | const std::string& name, |
nothing calls this directly
no test coverage detected