Skip to content

Commit

Permalink
Fixed math for interpreter
Browse files Browse the repository at this point in the history
  • Loading branch information
jedjoud10 committed Dec 3, 2019
1 parent 002402b commit 1a1f412
Show file tree
Hide file tree
Showing 12 changed files with 186 additions and 620 deletions.
6 changes: 3 additions & 3 deletions Assets/Player/Play Mode/Interpreter/Interpreter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ public float MathFloat(float num1, float num2, string operation)
}
if (operation == "-")
{
return num1 + num2;
return num1 - num2;
}
if (operation == "*")
{
return num1 + num2;
return num1 * num2;
}
if (operation == "/")
{
return num1 + num2;
return num1 / num2;
}
return num1;
}
Expand Down
3 changes: 3 additions & 0 deletions Assets/SavedPrograms/TemporarySave.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Print( Distance_Sensor1 )
speed = Distance_Sensor1 - 500
Print( speed )
Loading

0 comments on commit 1a1f412

Please sign in to comment.