Replies: 5 comments
-
Thanks, good point! The class I like your idea of passing an optional |
Beta Was this translation helpful? Give feedback.
-
There is already an override option for defining a new unit: math.createUnit('mile', '1609.347218694', {override: true}}); |
Beta Was this translation helpful? Give feedback.
-
LOL I should have checked that beforehand, sorry. @ericman314 How do you think about exposing |
Beta Was this translation helpful? Give feedback.
-
Absolutely. I will try to get to it this week. |
Beta Was this translation helpful? Give feedback.
-
@ericman314 Let's put this here as a live example for future readers: http://jsbin.com/dimayikimu/edit?html,output The |
Beta Was this translation helpful? Give feedback.
-
Since
math.createUnit()
throws an exception when creating a unit multiple times, we should be able to delete a unit.Rationale + Proposal
We have a context focused unit:
box
. Itemfoo
has 6 items in a box and itembar
has 10 items in a box.So we need to make the calculation in their context:
Beta Was this translation helpful? Give feedback.
All reactions