diff --git a/README-zh.md b/README-zh.md index a3b6dc0..c642f40 100644 --- a/README-zh.md +++ b/README-zh.md @@ -162,7 +162,7 @@ console.log(math.multiply(a, b).toString()) 这个库还支持字符串表达式求值, 所以上边的可以写为: ```js -console.log(math.eval('(3 - i) * i').toString()) +console.log(math.evaluate('(3 - i) * i').toString()) //=> '1 + 3i' ``` diff --git a/README.md b/README.md index 75b42dd..f2195b1 100644 --- a/README.md +++ b/README.md @@ -164,7 +164,7 @@ console.log(math.multiply(a, b).toString()) The library also supports evaluating a string expression, so the above could be re-written as: ```js -console.log(math.eval('(3 - i) * i').toString()) +console.log(math.evaluate('(3 - i) * i').toString()) //=> '1 + 3i' ```