From 647d827e5dcd66e839ce7fc54cd7a2a224c647db Mon Sep 17 00:00:00 2001 From: Mahdi Dibaiee Date: Mon, 20 Apr 2015 15:19:53 +0430 Subject: [PATCH] ow :punch: --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..4fec321 --- /dev/null +++ b/README.md @@ -0,0 +1,28 @@ +Equation +======== +Solve math expressions or create equations for repeated and complex Math tasks. +To use in browser, download [`equation.min.js`](https://raw.githubusercontent.com/mdibaiee/Equation.js/master/equation.min.js). + +```javascript +// solve +console.log(Equation.solve('4 * lg(4) ^ 3')); // 32 + +// equation +let sphereArea = Equation.equation('4 * PI * r^2'); + +console.log(sphereArea(5)); // 314.1592653589793 +``` + +API +=== +####solve(expression: String) +Takes a math expression and evaluates it, returning the result. + +###equation(expression: String) +Takes a math expression containing variables, returning a function which +replaces the variables with given arguments, and solves the expression. + +TODO +==== +* Equation solver +* More tests