README.md in dentaku-0.2.2 vs README.md in dentaku-0.2.3

- old
+ new

@@ -42,19 +42,27 @@ calculator.evaluate('5 + 3 * 2') => 11 calculator.evaluate('(5 + 3) * 2') => 16 -A number of functions are also supported. Okay, the number is currently one, -but more will be added soon. The current function is `if`, which works like -Excel's `if`: +A number of functions are also supported. Okay, the number is currently two, +but more will be added soon. The current functions are `round` and `if`, and +they work like their counterparts in Excel: calculator.evaluate('if (pears < 10, 10, 20)', :pears => 5) => 10 calculator.evaluate('if (pears < 10, 10, 20)', :pears => 15) => 20 +`Round` can be called with or without the number of decimal places: + + calculator.evaluate('round(8.2)') + => 8 + calculator.evaluate('round(8.2759, 2)') + => 8.28 + + If you're too lazy to be building calculator objects, there's a shortcut just for you: Dentaku('plums * 1.5', {:plums => 2}) => 3.0 @@ -63,10 +71,10 @@ SUPPORTED OPERATORS AND FUNCTIONS --------------------------------- Math: `+ - * /` Logic: `< > <= >= <> != = AND OR` -Functions: `IF` +Functions: `IF ROUND` THANKS ------ Big thanks to [ElkStone Basements](http://www.elkstonebasements.com/) for