1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 02:47:34 +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:
creator1creeper1 2021-08-01 13:08:53 +02:00 committed by Ali Mohammad Pur
parent 97d2a5799e
commit 8f552c9979
6 changed files with 43 additions and 57 deletions

View file

@ -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;