-
I work in the lumber processing industry and I've just started evaluating this library for our product. When a customer creates a list of what they need to produce they'll basically say
For example, they want 20 board feet of 3.5 in. wide pieces. As they are creating this list they have one of three measurement options. The options are:
Does the library have an existing measurement that I can use so they can say "I want to produce five 3.5 in. pieces...I don't care how long the piece is or how much volume that piece has...I just want 5 of them." I started looking at creating a custom unit but became a bit overwhelmed and confused when trying to implement Right now I read the value from a data source in order to display the production requirements on the screen. What I wanted to do was to have two properties, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think the closest thing to a "unit of something" would be the https://github.com/angularsen/UnitsNet/blob/master/Common/UnitDefinitions/Scalar.json. However I'm not sure if this is really well suited for representing countable things (given the floaty-point nature of the I've personally used this type of definition |
Beta Was this translation helpful? Give feedback.
I think the closest thing to a "unit of something" would be the https://github.com/angularsen/UnitsNet/blob/master/Common/UnitDefinitions/Scalar.json.
However I'm not sure if this is really well suited for representing countable things (given the floaty-point nature of the
IQuantity
). You could map another unit abbreviation for it's unit, and using an integer-based format for theToString
etc, but I don't know..I've personally used this type of definition
OrderedAmount : OneOfBase<Volume, Mass, UnitaryQuantity>
, where the last one is simply not anIQuantity
(but usually comes with a unit such aspcs
, as in "10 pcs").