Description
One thing I have repeatedly found tricky to name or describe, is how to refer to the concepts that Length
and Force
represent.
It is natural to refer to centimeters and newtons as units, or units of measure, but I always lacked a good name for their grouping/family. After some googling, it seems physical quantity is the correct term.
wiki/Units_of_measurement spells it out pretty well:
A unit of measurement is a definite magnitude of a quantity, defined and adopted by convention or by law, that is used as a standard for measurement of the same quantity.[1] Any other value of that quantity can be expressed as a simple multiple of the unit of measurement.
For example, length is a physical quantity. The metre is a unit of length that represents a definite predetermined length. When we say 10 metres (or 10 m), we actually mean 10 times the definite predetermined length called "metre".
Example :
You can convert between units of the same physical quantity.
Proposal (final, edited 2017-08-18)
- Quantities are represented by struct types like
Length
andForce
and correspondingenum
typesLengthUnit
andForceUnit
- Units are represented by
enum
values likeLengthUnit.Meter
andForceUnit.Newton
- Unit conversions are represented by instance properties, such as
Length.Meters
andForce.Newtons
and custom conversion methods likeForce.FromPressureByArea()
- Generic type parameters are named
TQuantity
for unit struct types, such asLength
TUnitType
for unit enum types, such asLengthUnit
Any thoughts on the matter?
I would like to go through the docs and source to ensure the wording is used consistently, as well as on future PR reviews.
Sources:
https://en.wikipedia.org/wiki/Physical_quantity
https://en.wikipedia.org/wiki/Units_of_measurement
https://en.wikipedia.org/wiki/Quantity
https://en.wikipedia.org/wiki/Metrology#Definition_of_units