summaryrefslogtreecommitdiff
path: root/Userland/Applications/Calculator/Keypad.h
AgeCommit message (Collapse)Author
2023-02-05Calculator: Treat constants and pasted numbers as inputSamuel Eisenhandler
Constants and pasted numbers leave Keypad in the External state which causes subsequent operations to be performed without an argument.
2022-12-31Calculator: Support chaining and repeating operationsKarol Baraniecki
The calculator now supports chaining (hitting "1+2+3=" shows "6" instead of "5") and repeating ("2+2===" shows "8") operations. :^)
2022-12-31Calculator: Fix which digits get animated when pressing keyboard keysKarol Baraniecki
Previously every digit press would appear like "0" was pressed on the keypad.
2022-12-06Everywhere: Rename to_{string => deprecated_string}() where applicableLinus Groh
This will make it easier to support both string types at the same time while we convert code, and tracking down remaining uses. One big exception is Value::to_string() in LibJS, where the name is dictated by the ToString AO.
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-10-03Calculator: Add a Shrinking actionLucas CHOLLET
This action allow the user to shrink a number to a finite number of decimal.
2022-10-03Calculator: Add a "Custom" entry to the rounding menuLucas CHOLLET
This entry pop a dialog to ask the user to enter a value. The Calculator will automatically put itself in this mode if you enter a number with more digits in the fractional part than the actual maximum length.
2022-10-03Calculator: Add a Rounding menuLucas CHOLLET
This menu has three actions. Each one of them enable a different level of rounding: to 0, 2 or 4 digits.
2022-09-15Calculator: Change internal representation to support perfect divisionLucas CHOLLET
The purpose of this patch is to support addition, subtraction, multiplication and division without using conversion to double. To this end, we use the BigFraction class of LibCrypto. With this solution, we can store values without any losses and forward rounding as the last step before displaying.
2022-02-14Applications: Use default constructors/destructorsLenny Maiorani
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules "The compiler is more likely to get the default semantics right and you cannot implement these functions better than the compiler."
2021-08-03Calculator: Use KeypadValue class instead of doublecreator1creeper1
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.
2021-05-23Calculator: Use Checked to ensure entered values do not overflowMax Wipfli
This replaces the types of m_int_value and m_frac_value with Checked<u64> which makes it possible to check if the value overflowed when entering a digit. If that happens, the digit will just be ignored. This fixes #1263.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-01-12Applications: Move to Userland/Applications/Andreas Kling