Closed kmcphillips closed 7 years ago
It's definitely unused. I love 🔥 ing code.
It may be as simple as rather than saying:
base :g
unit :kg, value: "1000 g"
We can just give everything a value:
unit :g, value: "0.001 kg"
unit :kg, value: "1000 g"
Or maybe even just 1
We define
base
unit without a value, then aunit value: 'other unit'
.Explore if we can remove the
base
altogether. Building the parse graph may be more complex, but we can experiment with just processing them in order and not depending on a base.This may help us with #59 that don't share a common zero point, and simply express units relative to other units.