Skip to content

Releases: shivam091/unit_measurements

v5.17.0

14 Dec 17:06
8134cd2
Compare
Choose a tag to compare

What's new

  • Added new units qr, U, and z in length.
  • Added new units qr, fir, and us_qr in weight.
  • Added new units dun, sec, and twp in area.
  • Added new units st, fir, and pot in volume.

What's changed

  • Changed implementation of #units_for! to raise error if the unit system is not defined
    within the unit group.
  • Changed symbol of barleycorn length unit.

v5.16.0

13 Dec 05:24
50f76ec
Compare
Choose a tag to compare

What's new

  • Added planck units and their conversions.

v5.15.0

29 Nov 12:33
41c1618
Compare
Choose a tag to compare

What's new

  • Added .define_conversion_methods method to define conversion helper methods for units.

v5.14.0

27 Nov 14:48
12e56f5
Compare
Choose a tag to compare

What's new

  • Added .define_numeric_methods support to define numeric extension methods for units.

v5.13.0

26 Nov 09:12
d52fd2f
Compare
Choose a tag to compare

What's new

  • Added Measurement#to_primitive to convert the measurement to the primitive unit.
  • Added #cbrt method to calculate cube root of the measurement quantity.
  • Added #sqrt method to calculate square root of the measurement quantity.
  • Aliased #to_primitive method as #in_primitive and #as_primitive.

v5.12.0

25 Nov 13:29
6b52fb1
Compare
Choose a tag to compare

What's new

  • Added MissingPrimitiveUnitError error if user tries to convert measurement to
    the primitive unit but it's not set for the unit group.
  • Aliased #+ method as #add.
  • Aliased #- method as #subtract.
  • Aliased #* method as #times and #multiply.
  • Aliased #/ method as #divide.

v5.11.1

16 Nov 13:50
594e1b0
Compare
Choose a tag to compare

What's changed

v5.11.0

09 Nov 17:28
6aeb4c1
Compare
Choose a tag to compare

What's new

  • Added #systems method to return unit systems within the unit group.
  • Added #ratio method to calculate the ratio between two units.

v5.10.0

07 Nov 14:16
f726a09
Compare
Choose a tag to compare

What's new

  • Added new method #to_fs to format the measurement.
  • Aliased arithmetic method #** to #pow and #^.
  • Aliased arithmetic method #-@ to #inverse and #negate.
  • Added UnitMeasurements::BlankQuantityError error if tried to initialize the Measurement with a blank quantity.
  • Added UnitMeasurements::BlankUnitError error if tried to initialize the Measurement with a blank unit.

What's deprecated

  • #format method in favour of #to_fs.

v5.9.0

06 Nov 14:13
1923fd8
Compare
Choose a tag to compare

What's new

  • Added new units of force.
  • Added new units of torque.
  • Added new units of energy.