diff options
author | Bruce Wells <brucekwells@gmail.com> | 2020-02-07 20:27:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-07 20:27:48 +0300 |
commit | 0eeed45566ec7bac6865cb6d30acb5777ccf6f43 (patch) | |
tree | 08f466dfb6e945eb4f6b1b826307d33b2aa7ecb2 | |
parent | 43790a456e8ec4104895869b178165fec65613d7 (diff) | |
parent | 2db48eff956f5a63513685cb5b576b588c698912 (diff) |
Merge branch 'master' into master
-rw-r--r-- | .travis.yml | 1 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | src/NXP/MathExecutor.php | 4 | ||||
-rw-r--r-- | tests/MathTest.php | 6 |
4 files changed, 6 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml index 3a63f2f..a471c3e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ php: - 7.1 - 7.2 - 7.3 + - 7.4 before_script: - wget http://getcomposer.org/composer.phar @@ -78,8 +78,6 @@ $executor->addFunction('abs', function($arg) {return abs($arg);}); ``` Function default parameters are not supported at this time. -Default parameters are not currently supported. - ## Operators: Default operators: `+ - * / ^` diff --git a/src/NXP/MathExecutor.php b/src/NXP/MathExecutor.php index 5de7dc5..9d3f5e8 100644 --- a/src/NXP/MathExecutor.php +++ b/src/NXP/MathExecutor.php @@ -365,7 +365,7 @@ class MathExecutor 'log' => function ($arg) { return log($arg); }, - 'log10' => function ($arg) { + 'log10' => function ($arg) { return log10($arg); }, 'log1p' => function ($arg) { @@ -401,7 +401,7 @@ class MathExecutor 'sqrt' => function ($arg) { return sqrt($arg); }, - 'tan' => function ($arg) { + 'tan' => function ($arg) { return tan($arg); }, 'tanh' => function ($arg) { diff --git a/tests/MathTest.php b/tests/MathTest.php index 1ffa5ae..0de2465 100644 --- a/tests/MathTest.php +++ b/tests/MathTest.php @@ -73,11 +73,11 @@ class MathTest extends \PHPUnit\Framework\TestCase ['hypot(1.5, 3.5)'], ['intdiv(10, 2)'], ['log(1.5)'], - ['log10(1.5)'], + ['log10(1.5)'], ['log1p(1.5)'], ['max(1.5, 3.5)'], ['min(1.5, 3.5)'], - ['octdec(1.5)'], + ['octdec("15")'], ['pi()'], ['pow(1.5, 3.5)'], ['rad2deg(1.5)'], @@ -85,7 +85,7 @@ class MathTest extends \PHPUnit\Framework\TestCase ['sin(1.5)'], ['sinh(1.5)'], ['sqrt(1.5)'], - ['tan(1.5)'], + ['tan(1.5)'], ['tanh(1.5)'], ['0.1 + 0.2'], |