Skip to content

Conversation

lipchev
Copy link
Collaborator

@lipchev lipchev commented Jan 4, 2025

Include the non-prefixed BaseUnits in the BaseUnitPrefixes:

  • the BaseUnitPrefixes now also handles the case where prefixing an already prefixed base unit results in a non-prefixed base unit
  • regenerating the quantities resulted in a number of new BaseUnits to become available (as well as some which got their scales reduced)

@lipchev lipchev requested a review from angularsen January 7, 2025 21:38
new UnitInfo<PowerUnit>(PowerUnit.Microwatt, "Microwatts", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Milligram, time: DurationUnit.Second), "Power"),
new UnitInfo<PowerUnit>(PowerUnit.MillijoulePerHour, "MillijoulesPerHour", BaseUnits.Undefined, "Power"),
new UnitInfo<PowerUnit>(PowerUnit.Milliwatt, "Milliwatts", BaseUnits.Undefined, "Power"),
new UnitInfo<PowerUnit>(PowerUnit.Milliwatt, "Milliwatts", new BaseUnits(length: LengthUnit.Meter, mass: MassUnit.Gram, time: DurationUnit.Second), "Power"),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this example I can relate to. Watt is m*kg*s, so Milliwatt can be m*g*s.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like you keep getting more and more base units defined, nice 👏

@angularsen angularsen merged commit 428b58b into angularsen:release/v6 Jan 19, 2025
1 check passed
@lipchev lipchev deleted the baseunits-de-prefixing branch April 11, 2025 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants