Skip to content
Commit b0754b14 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

Formatter: Don't try to prefix units that we don't have a prefixed version of

Otherwise we would roll over to the next unrelated unit.
For example trying to display 1000 Watts results in it trying to use
1 Watts + prefix kilo (1), which ends up at the next unit "WattHour",
which makes no sense.

Check whether the prefixed unit has the same base as the one we try to
format. We'd rather show a million Watts than the wrong unit to begin with.
parent 6659b3a3
Pipeline #371755 passed with stage
in 1 minute and 47 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment