Add negative support to si_string (closes #1396)

This commit is contained in:
Alexander van Gessel 2019-06-06 17:32:11 +02:00
parent a305d99972
commit f5991ecb48

View file

@ -535,6 +535,10 @@ std::string si_string(double input, bool base2, const std::string& unit) {
typedef std::array<std::string, 9> strings9;
if(input < 0){
return font::unicode_minus + si_string(std::abs(input), base2, unit);
}
strings9 prefixes;
strings9::const_iterator prefix;
if (input == 0.0) {