From 32f3d0057ccc8be6924cce9d71b5ee49ac0e6867 Mon Sep 17 00:00:00 2001 From: Farooq Karimi Zadeh Date: Tue, 28 Nov 2017 21:52:52 +0330 Subject: [PATCH] Update README.md --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d2df844..0b089f7 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Install using npm: npm install equations ``` -####Examples: +#### Examples: ```javascript // solve @@ -53,28 +53,28 @@ For a list of operators and constants see [`operators.js`](https://github.com/md API === -####solve(expression: String) +#### solve(expression: String) Takes a math expression and evaluates it, returning the result. -####equation(expression: String) +#### equation(expression: String) Takes a math expression containing variables, returning a function which replaces the variables with given arguments, and solves the expression. -####registerOperator(key: String, options: Object) +#### registerOperator(key: String, options: Object) Registers a new operator. Options: -#####fn +##### fn The function which is run on arguments and returns the result -#####format +##### format The format which specifies how arguments are placed relative to operator, this is a string in which 1 represents the operator and zeroes represent arguments. For example `+` has the format `010` and factorial has `01`. -#####precedence +##### precedence Specifies the precedence of operator. The less the value, the higher the precedence, resulting in sooner execution. -####registerConstant(key: String, value: Function/Number) +#### registerConstant(key: String, value: Function/Number) Registers a new constant. value can be a function (takes no arguments), or a constant number. That's right, we have named these *constants* but they actually can change, that's why we can use functions to define them. An example is the `RAND` constant which calls `Math.random`.