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
Now that the increase_by / decrease_by percentage-calculation functions have been added, it would be great to have an easy and quick syntax to do those kinds of calculations. The following syntax was proposed in the discussion of #494:
1000 -% 20
1000 +% 20
Seeing as syntax like 72 € - 15% can't be supported, the proposed syntax (above) is the next best thing, and has the advantage of being quick to type and easier to remember.
So, instead of 72 € - 15%, we would use: 72 € -% 15
The text was updated successfully, but these errors were encountered:
Maybe I'm being unnecessarily picky but I think it is not ideal that the proposed operator dictates the unit of the second operand, in my opinion the new "increase-by" and "decrease-by" operators should work for any scalar second operand.
So 1000 <decrease-by> 20%, 1000 <decrease-by> 0.2, 1000 <decrease-by> 200‰ should all result in 800.
Would syntax for percent_change maybe be useful too? I’m thinking something like >% and <% to denote the order of arguments. This way the problem: "how many percent increase is 50 kg to 75 kg?"
Could be written as:
50 kg >% 75 kg
I’m not quite sure if the greater than less than characters are ideal, but I think the concept might be useful.
Now that the
increase_by
/decrease_by
percentage-calculation functions have been added, it would be great to have an easy and quick syntax to do those kinds of calculations. The following syntax was proposed in the discussion of #494:1000 -% 20
1000 +% 20
Seeing as syntax like
72 € - 15%
can't be supported, the proposed syntax (above) is the next best thing, and has the advantage of being quick to type and easier to remember.So, instead of
72 € - 15%
, we would use:72 € -% 15
The text was updated successfully, but these errors were encountered: