juniper-wright / UtopianEngine

The Simple Text Adventure Game Engine
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

UtopiaScript - Mathematics operators #17

Closed juniper-wright closed 11 years ago

juniper-wright commented 11 years ago

This is a feature request for the UtopiaScript parser. References #1.

juniper-wright commented 11 years ago

http://www.objecthunter.net/exp4j/ This is a math expression parser which can be used for the UtopiaScript mathematics operators.

juniper-wright commented 11 years ago

Via the Rhino javascript engine, this can be accomplished via:

var x = 5 + 10 / 3;
var y = x * 2;
print(y);

inside of the JavaScript string.