Shopify / measured

Encapsulate measurements and their units in Ruby and Ruby on Rails.
MIT License
362 stars 28 forks source link

Add mm3 cm3 volume unit conversion #144

Closed fekadeabdejene closed 2 years ago

fekadeabdejene commented 2 years ago

Add support additional volume units:

Native support for cm3 and mm3 units in the measured gem.

Added: Unit conversion Tests for all unit conversions Updated cache

fekadeabdejene commented 2 years ago

Looks good. What's the use case for mm3?

When we do volume calculations we support dimensions with millimeter units. These would convert to cubic_millimeter after calculating the volume. This allows us to have a base unit for volume in these cases to do subsequent conversions with like liters, cubic_meters etc.

kmcphillips commented 2 years ago

I have released both measured and measured-rails at 2.8.2 with this change.