You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
varmeasure=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!
The text was updated successfully, but these errors were encountered:
Sorry, I forgot about this. Perhaps before trying a fix for this, we should look more closely at #1300 and find a good solution there that will address this and other related issues.
Yes I think so. There are also some other ideas for improvements of units floating around here and there (#1305, #1306, #1041, maybe others). Can be helpful to keep these in mind too.
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
Thanks in advance!
The text was updated successfully, but these errors were encountered: