From 67599e709147d3e00c33fca256b1fdfbf47d0aab Mon Sep 17 00:00:00 2001 From: PaddiM8 Date: Fri, 14 Jan 2022 22:09:52 +0100 Subject: [PATCH] Fixed incorrect vector operations --- kalk/src/kalk_value/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kalk/src/kalk_value/mod.rs b/kalk/src/kalk_value/mod.rs index efe1ab6..3769d0c 100644 --- a/kalk/src/kalk_value/mod.rs +++ b/kalk/src/kalk_value/mod.rs @@ -803,7 +803,7 @@ impl KalkValue { (KalkValue::Vector(values), KalkValue::Number(_, _, _)) => KalkValue::Vector( values .iter() - .map(|x| x.clone().mul_without_unit(lhs)) + .map(|x| x.clone().mul_without_unit(rhs)) .collect(), ), (KalkValue::Vector(values), KalkValue::Vector(values_rhs)) => { @@ -1024,7 +1024,7 @@ fn calculate_vector( values .iter() .zip(values_rhs) - .map(|(x, y)| x.clone().add_without_unit(&y)) + .map(|(x, y)| action(x.clone(), &y)) .collect(), ) } else {