Fixed subtract unit check

dev
rm-dr 2023-10-15 11:26:54 -07:00
parent 2ff42bf62a
commit 0d81d58370
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
1 changed files with 2 additions and 0 deletions

View File

@ -124,6 +124,8 @@ pub fn eval_operator(context: &mut Context, g: &Expression) -> Result<Option<Exp
if let Expression::Quantity(la, a) = a {
if let Expression::Quantity(lb, b) = b {
if !a.unit.compatible_with(&b.unit) {
let a = a.convert_to_base().unit;
let b = b.convert_to_base().unit;
let a_s: String;
let b_s: String;