diff options
| author | 2018-12-08 21:14:43 +0100 | |
|---|---|---|
| committer | 2018-12-08 21:14:43 +0100 | |
| commit | bb47c33763d250cc424216a1dd0fedefa80532a3 (patch) | |
| tree | 3e60a84a8cd963d828299d49256ed6cd7c1bdd6f /result/diceresult.cpp | |
| parent | b28b096d2fe3ddfed099ee8cc33c8caa504d7c83 (diff) | |
| parent | 48de810db56b728726ec8b499b9a12c687b53795 (diff) | |
| download | OneRoll-bb47c33763d250cc424216a1dd0fedefa80532a3.tar.gz OneRoll-bb47c33763d250cc424216a1dd0fedefa80532a3.zip | |
Merge branch 'master' of github.com:Rolisteam/DiceParser
Diffstat (limited to 'result/diceresult.cpp')
| -rw-r--r-- | result/diceresult.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/result/diceresult.cpp b/result/diceresult.cpp index 7894b60..c1089dd 100644 --- a/result/diceresult.cpp +++ b/result/diceresult.cpp @@ -114,6 +114,9 @@ qreal DiceResult::getScalarResult() case Die::MINUS: scalar-=tmp->getValue(); break; + case Die::POW: + scalar=static_cast<int>(pow(static_cast<double>(scalar),static_cast<double>(tmp->getValue()))); + break; case Die::DIVIDE: case Die::INTEGER_DIVIDE: if(tmp->getValue()!=0) @@ -135,8 +138,6 @@ qreal DiceResult::getScalarResult() } return scalar; } - - return 0; } Die::ArithmeticOperator DiceResult::getOperator() const |