Skip to content
New issue

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

Support units in function round #1296

Open
stoplion opened this issue Oct 27, 2018 · 1 comment
Open

Support units in function round #1296

stoplion opened this issue Oct 27, 2018 · 1 comment
Labels

Comments

@stoplion
Copy link

@stoplion stoplion commented Oct 27, 2018

Is there a way to make units work with functions?
round(2.70 inches)
errors out.

@josdejong

This comment has been minimized.

Copy link
Owner

@josdejong josdejong commented Oct 27, 2018

Units do work with a lot of functions, but is not supported with round.

We can consider adding support for units in round It can lead to ambiguous situations, like what would you expect as output for round(2.5 cm + 10.5 mm) ? Would that round to 3 cm or to 31 mm?

It could work if we pass an additional argument to round to specify in which unit we would like to round, like round(2.5 cm + 10.5 mm, cm).

@josdejong josdejong changed the title Can units work with functions? Support units in function round Oct 27, 2018
@josdejong josdejong added the feature label Oct 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.