mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 07:07:44 +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
|
@ -6,6 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "KeypadValue.h"
|
||||
#include <AK/String.h>
|
||||
|
||||
// This type implements number typing and
|
||||
|
@ -22,8 +23,8 @@ public:
|
|||
void type_decimal_point();
|
||||
void type_backspace();
|
||||
|
||||
double value() const;
|
||||
void set_value(double);
|
||||
KeypadValue value() const;
|
||||
void set_value(KeypadValue);
|
||||
|
||||
String to_string() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue