mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 12:46:47 +02:00
Fix exceptions and incorrect results within the calculator plugin (#7438)
* remove functions which mages cannot interpret and add in functions which mages can * set validResult when the result is explicitly created to differentiate it form an empty CalculateResult * Add condition to check that the input is not ending with a binary operation * add tests for all the cases * use valid result while calculating hash as well * add test for e is valid within regex * removed i from regex * remove valid result to use decimal? instead * remove duplicate rand and exp
This commit is contained in:
@@ -9,9 +9,9 @@ namespace Microsoft.Plugin.Calculator
|
||||
{
|
||||
public struct CalculateResult : IEquatable<CalculateResult>
|
||||
{
|
||||
public decimal Result { get; set; }
|
||||
public decimal? Result { get; set; }
|
||||
|
||||
public decimal RoundedResult { get; set; }
|
||||
public decimal? RoundedResult { get; set; }
|
||||
|
||||
public bool Equals(CalculateResult other)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user