We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Despite zero being the additive identity in the following expression, a unit conversion error is thrown (in version 1.5.2):
> 1 meter + 0 Error: cannot convert from unitless to meters: units 'unitless' and 'meter' are incompatible
However, explicitly specifying the unit results in the correct output:
> 1 meter + 0 meters 1 meter
I would expect the unitless version to work given that multiplying or dividing a value by a unitless 1 works fine.
The text was updated successfully, but these errors were encountered:
Thanks for the report, I agree it would make sense to support this.
Sorry, something went wrong.
Allow adding zero regardless of units (#310)
e8351a9
I've implemented this now; I'll do a bit more testing to make sure there's no unintended breakage but I think it should be good.
b2194d6
No branches or pull requests
Despite zero being the additive identity in the following expression, a unit conversion error is thrown (in version 1.5.2):
However, explicitly specifying the unit results in the correct output:
I would expect the unitless version to work given that multiplying or dividing a value by a unitless 1 works fine.
The text was updated successfully, but these errors were encountered: