Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Models / CellFormula.cpp
diff options
context:
space:
mode:
Commitcd40b3479f8ce874cc69663b7318dc9f033ed1f1 (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-05-29 10:14:27 +0300
Committer
 Syndamia <kamen@syndamia.com>
2022-05-29 10:14:27 +0300
Files343fa572cdf20e4d861c90eb6c53178348de3045 /src/Models/CellFormula.cpp
FMI-OOP-P2_Tables-cd40b3479f8ce874cc69663b7318dc9f033ed1f1.tar
FMI-OOP-P2_Tables-cd40b3479f8ce874cc69663b7318dc9f033ed1f1.tar.gz
FMI-OOP-P2_Tables-cd40b3479f8ce874cc69663b7318dc9f033ed1f1.zip
Parenta1ebb727ac98a291a944562f7be17e3645f5315a (diff)
Autocommit at 29.05.2022 @ 10:14
1 files changed, 1 insertions, 2 deletions
-rw-r--r--src/Models/CellFormula.cpp3
diff --git a/src/Models/CellFormula.cpp b/src/Models/CellFormula.cpp
index ecea06d..72c2a99 100644
--- a/src/Models/CellFormula.cpp
+++ b/src/Models/CellFormula.cpp
@@ -27,7 +27,7 @@ double CellFormula::calculate(unsigned index) {
case '-' : return lval - calculate(++index);
case '*' : return lval * calculate(++index);
case '/' : return lval / calculate(++index);
- case '^' :
+ case '^' : return pow(lval, calculate(++index));
case '\0' :
default : return lval;
}
@@ -45,7 +45,6 @@ double CellFormula::getNumeralValue() {
}
String CellFormula::getValueForPrint() {
- std::cout << formula.get_count() << std::endl;
return String() += calculate();
}