1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:47:44 +00:00

Calculator: Add a Rounding menu

This menu has three actions. Each one of them enable a different level
of rounding: to 0, 2 or 4 digits.
This commit is contained in:
Lucas CHOLLET 2022-09-22 16:54:46 +02:00 committed by Tim Flynn
parent 164094e161
commit de568f87fd
5 changed files with 35 additions and 5 deletions

View file

@ -29,6 +29,8 @@ public:
void set_value(Crypto::BigFraction);
void set_to_0();
void set_rounding_length(unsigned);
String to_string() const;
private:
@ -46,6 +48,8 @@ private:
mutable Crypto::BigFraction m_internal_value {};
unsigned m_displayed_fraction_length { 0 };
enum class State {
External,
TypingInteger,