From 8d602b30dd9bf9e1b926c0d732c2ff3fe7b6644a Mon Sep 17 00:00:00 2001 From: ochi51 Date: Tue, 12 Sep 2017 20:54:51 +0900 Subject: Fixes exponentiation operator --- src/NXP/Classes/Token/TokenDegree.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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); } -- cgit v1.2.3