From 9925a1023bb4a4af81f5ee3ddf70ce1d60e4608b Mon Sep 17 00:00:00 2001 From: Mahdi Dibaiee Date: Mon, 20 Apr 2015 14:32:34 +0430 Subject: [PATCH] README --- lib/README.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/lib/README.md b/lib/README.md index 62d10cf..f8b45e8 100644 --- a/lib/README.md +++ b/lib/README.md @@ -1,14 +1,27 @@ Equation ======== - Solve math expressions or create equations for repeated and complex Math tasks. ```javascript // solve -console.log(Equation.solve('4 * lg4 ^ 3')); // 32 +console.log(Equation.solve('4 * lg4 ^ 3')); // 32 -// equations +// 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