Set unitSystem conversion
Open
- Dominant language
- JavaScript
- Stars
- 15.1k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to set a unitSystem for a Unit that was created in "Inch", when I call setUnitSystem('si') the unit system is corretly changed.
However when calling the format() the unit is still represented in Inch.
Is there a way to solve this?
This is the code
```js
var measure = math.unit("2 in")
console.log(measure.formatUnits());
//"in"
measure.constructor.setUnitSystem("si");
console.log("unit system :" + measure.constructor.getUnitSystem());
// "unit system: si"
console.log(measure.formatUnits());
// "in" => should be "m"?
```
Thanks in advance!
Contributor guide
Assessment
This issue has not been assessed yet.