Skip to content

Custom units incompatible with decimal format? #1324

Closed
@marc-weber1

Description

@marc-weber1

Is your feature request related to a problem? Please describe.
I am trying to make a new quantity called RelativeDensity inheriting from IQuantity, but I need the underlying value to be full 128-bit decimal for precision reasons. From this pull request - #1084 - I was under the impression that QuantityValue, not double, was returned by types in UnitsNet.

Describe the solution you'd like
Add support for generic or just decimal custom quantities, and update the documentation - https://github.com/angularsen/UnitsNet/wiki/Extending-with-Custom-Units

Describe alternatives you've considered
I could try just submitting a pull request with a RelativeDensity quantity, since it just uses the same units as Density - but I have other quantities to add as well.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions