mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 11:37:45 +00:00
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.
This commit is contained in:
parent
97d2a5799e
commit
8f552c9979
6 changed files with 43 additions and 57 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue