diff options
author | creator1creeper1 <creator1creeper1@airmail.cc> | 2021-08-01 13:08:53 +0200 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-08-03 19:12:06 +0430 |
commit | 8f552c9979d92aead2589c8fb3a6d9298faa5603 (patch) | |
tree | 939aa4a17146fd797c14070a874ec49eee2f717e /Userland/Applications/Calculator/CalculatorWidget.h | |
parent | 97d2a5799e78d6d37f55cbd76d0a0d6e2d88aa65 (diff) | |
download | serenity-8f552c9979d92aead2589c8fb3a6d9298faa5603.zip |
Calculator: Use KeypadValue class instead of double
Calculator now uses the KeypadValue class instead of double in
its internal calculations. By not constantly converting to
double back-and-forth, we do not use precision simply by, for
example, negating a number. This fixes #7484.
Diffstat (limited to 'Userland/Applications/Calculator/CalculatorWidget.h')
-rw-r--r-- | Userland/Applications/Calculator/CalculatorWidget.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Applications/Calculator/CalculatorWidget.h b/Userland/Applications/Calculator/CalculatorWidget.h index ae5e6d399e..b18570a733 100644 --- a/Userland/Applications/Calculator/CalculatorWidget.h +++ b/Userland/Applications/Calculator/CalculatorWidget.h @@ -9,6 +9,7 @@ #include "Calculator.h" #include "Keypad.h" +#include "KeypadValue.h" #include <AK/Vector.h> #include <LibGUI/Widget.h> @@ -17,7 +18,7 @@ class CalculatorWidget final : public GUI::Widget { public: virtual ~CalculatorWidget() override; String get_entry(); - void set_entry(double); + void set_entry(KeypadValue); private: CalculatorWidget(); |