Skip to content

Conversation

@Jagailo
Copy link
Contributor

@Jagailo Jagailo commented Jan 13, 2025

AreaMomentOfInertia:

Use superscript (cm², m³) instead of cm^2, m^3

MolarEntropy:

Use · for products (N·m instead of Nm, N*m or N.m)

SpecificEntropy:

Use · for products (N·m instead of Nm, N*m or N.m)

Using parentheses for mathematically correct display; using the correct symbol for degrees Celsius

SpecificFuelConsumption:
It looks like some unusual multiplication sign was used

WarpingMomentOfInertia:

Use superscript (cm², m³) instead of cm^2, m^3


For ^4 and ^6 UnitParser.NormalizeUnitString() will handle this situation

Copy link
Owner

@angularsen angularsen left a comment

Choose a reason for hiding this comment

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

Good improvements! A couple of suggestions.

@Jagailo Jagailo requested a review from angularsen January 19, 2025 20:37
Copy link
Owner

@angularsen angularsen left a comment

Choose a reason for hiding this comment

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

Ok, there are a couple of minor breaking changes here, but I'll risk it.

I think very few will be upset that we no longer support parsing * or . in these unit abbreviations. I'd rather have the parser use normalization or attempt a few fallbacks to cover such alternative formats.

@angularsen angularsen merged commit b583121 into angularsen:master Jan 19, 2025
1 check was pending
@Jagailo
Copy link
Contributor Author

Jagailo commented Jan 19, 2025

I work in the medical domain and our users enter units by hand.
The · symbol isn't on the keyboard, but they are too lazy to press *, so we have a huge bunch of units of different quantities ​​written with a dot, because it's faster for them.
Units with a dot are just a mistake, and * is replaced in NormalizeUnitString, so I highly doubt that this fix will be inconvenient for anyone.
We shouldn't support incorrectly written units, imho.

@Jagailo Jagailo deleted the abbreviation-correction branch January 19, 2025 23:59
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