iliekturtles / uom

Units of measurement -- type-safe zero-cost dimensional analysis
Apache License 2.0
1.01k stars 92 forks source link

Change of base_unit of Ratio quantity #451

Closed igiona closed 8 months ago

igiona commented 9 months ago

Hi

I'm facing issues with the precision, because of the fact that uom stores the values in the base unit.

I see that you can change the ISQ units, but I need to change the base unit of the Ratio type to percentage and other SI units. Is this feature supported? If yes, how can it be done?

Thank you ig

iliekturtles commented 8 months ago

Unfortunately, this isn't supported. In some future version of uom I plan to have types to allow you to store non-normalized units. For the time being there are no plans to allow for normalizing to an arbitrary unit.