diff --git a/src/n8/ast/expression/BinaryExpression.cpp b/src/n8/ast/expression/BinaryExpression.cpp index bc9374d..4c0db8a 100644 --- a/src/n8/ast/expression/BinaryExpression.cpp +++ b/src/n8/ast/expression/BinaryExpression.cpp @@ -102,6 +102,8 @@ DynamicObject BinaryExpression::applyNumOp(DynamicObject& lValue, DynamicObject& return DynamicObject(lValue.getNumber() * rValue.getNumber()); else if(this->op == "/") return DynamicObject(lValue.getNumber() / rValue.getNumber()); + else if(this->op == "\\") + return DynamicObject(rValue.getNumber() / lValue.getNumber()); else if(this->op == "%") return DynamicObject((float) ((int) lValue.getNumber() % (int) rValue.getNumber())); else if(this->op == "&") @@ -289,6 +291,13 @@ DynamicObject BinaryExpression::applyArrayOp(DynamicObject& lValue, DynamicObjec N8Util::object2Vector(rValue.getArray()) ) ); + else if(this->op == "\\") + return N8Util::vector2Object( + N8Util::VectorMath::div( + N8Util::object2Vector(rValue.getArray()), + N8Util::object2Vector(lValue.getArray()) + ) + ); else if(this->op == "%") return N8Util::vector2Object( N8Util::VectorMath::rem(