8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://en.wikipedia.org/wiki/Hectare#Are
Let say runtime known meter unit, be we want work with Are (1a = 100m2) and this unit is not known by the runtime.
meter
Are
Should this proposal allow to add custom units and describe possible conversions ?
API Idea (pseudocode):
Measure.addUnit({ symbol: 'a', name: 'are', kind: {type: 'distance', exponent: 2} // surface conversions: [ { type: 'distance', exponent: 2, unit: 'meter', convertTo: (ares: number) => ares * 100, convertFrom: (m2: number) => m2 / 100, } ], }); const measureAre = new Measure(1, {unit: 'are'}); const measureM2 = measureAre.convertTo('meter'); // Measure { value: 100, unit: 'meter', exponent: 2}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
https://en.wikipedia.org/wiki/Hectare#Are
Let say runtime known
meter
unit, be we want work withAre
(1a = 100m2) and this unit is not known by the runtime.Should this proposal allow to add custom units and describe possible conversions ?
API Idea (pseudocode):
The text was updated successfully, but these errors were encountered: