aboutsummaryrefslogtreecommitdiff
path: root/src/NXP/Classes/Token/TokenDegree.php
diff options
context:
space:
mode:
authorAlexander Kiryukhin <alexander@kiryukhin.su>2017-09-12 15:32:08 +0300
committerGitHub <noreply@github.com>2017-09-12 15:32:08 +0300
commit3cd949c04fe0aa3820694b47e951bb6f1528ac72 (patch)
tree8c2a14bcf09439e0544f6af3300d2229d0f39e44 /src/NXP/Classes/Token/TokenDegree.php
parent3436e0a51ff4c709226178f897e053c0fae8da4c (diff)
parent8d602b30dd9bf9e1b926c0d732c2ff3fe7b6644a (diff)
Merge pull request #20 from ochi51/master
Fixes exponentiation operator
Diffstat (limited to 'src/NXP/Classes/Token/TokenDegree.php')
-rw-r--r--src/NXP/Classes/Token/TokenDegree.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/NXP/Classes/Token/TokenDegree.php b/src/NXP/Classes/Token/TokenDegree.php
index 8488dcd..c31b66e 100644
--- a/src/NXP/Classes/Token/TokenDegree.php
+++ b/src/NXP/Classes/Token/TokenDegree.php
@@ -41,13 +41,13 @@ class TokenDegree extends AbstractOperator
/**
* @param InterfaceToken[] $stack
- * @return $this
+ * @return TokenNumber
*/
public function execute(&$stack)
{
$op2 = array_pop($stack);
$op1 = array_pop($stack);
- $result = $op1->getValue() ^ $op2->getValue();
+ $result = $op1->getValue() ** $op2->getValue();
return new TokenNumber($result);
}