fix: #3614 avoid unnecessary parentheses for complex values of a unit#3628
fix: #3614 avoid unnecessary parentheses for complex values of a unit#3628
Conversation
|
You need to add a test for format on The upshot is that (currently) testing if a complex number is actually real or actually pure imaginary is tricky. My recommended method is to test if So perhaps actually we should add mathjs functions Sorry this opened a little bit of a can of worms. But I don't think this PR is ready to merge as it stands, unfortunately. |
Fixes #3614
When formatting a unit that has a complex value, parentheses are only added around the value when the value has both a non-zero real and imaginary part.