josdejong / josdejong/mathjs

Allow adding units after a unit conversion

Open
#1,305 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
15.1k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

I'm not sure if this is a bug report or feature request, but I'd like the following to work if possible:

```
10 km in meters + 100 meters //this is an error, 'Parameter x contains a unit with undefined value'
(10 km in meters) + 100 meters //this works fine
```

'10 km in meters' produces a result in meters, so I'd expect to be able to add more meters to it without bracketing. But I guess there's a precedence issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.