diff options
| author | 2018-11-11 17:38:53 +0100 | |
|---|---|---|
| committer | 2018-11-11 17:38:53 +0100 | |
| commit | 750cc31e9157bf92f54a66b8a076e5287c4cef3a (patch) | |
| tree | 8931522a6b82cf82f997029ef76608243a27e904 /result | |
| parent | bd4a0c837bd5e3b4dbf9d3dcef892850d04ec6ac (diff) | |
| parent | 1d8bd391b1df4fd2f2f274828db14c9ce695eb8b (diff) | |
| download | OneRoll-750cc31e9157bf92f54a66b8a076e5287c4cef3a.tar.gz OneRoll-750cc31e9157bf92f54a66b8a076e5287c4cef3a.zip | |
Merge branch 'diceResult'
Diffstat (limited to 'result')
| -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 |