connorferster / forallpeople

Python SI units library: your 'daily driver' for calculations.
Apache License 2.0
307 stars 40 forks source link

Extra brackets when forcing output units with .prefix() in handcalcs formulas #113

Open cream68 opened 1 month ago

cream68 commented 1 month ago

To force the output units in a handcalcsformula, I need to append the .prefix("something") function. Unfortunately, for formulas, I have to wrap the entire formula in brackets and then apply the .prefix("") function, which results in additional brackets in the handcalcs output, e.g.:

A = ((D/2-t_p)*sqrt(D*t_p-t_p**2)).prefix('c')

Any ideas on how to resolve this issue?

By the way, I love this package!