mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 14:13:30 -07:00
set the display precision to 6 to align with C++ impl
This commit is contained in:
parent
4e1aff0f42
commit
48771c670f
1 changed files with 2 additions and 3 deletions
|
@ -476,8 +476,7 @@ namespace CalculatorApp
|
|||
|
||||
private double validateDouble(string value, double defaultValue)
|
||||
{
|
||||
double resultValue = 0;
|
||||
if (double.TryParse(value, out resultValue))
|
||||
if (double.TryParse(value, out var resultValue))
|
||||
{
|
||||
return resultValue;
|
||||
}
|
||||
|
@ -544,7 +543,7 @@ namespace CalculatorApp
|
|||
return;
|
||||
}
|
||||
|
||||
sender.Text = val.ToString("G", System.Globalization.CultureInfo.InvariantCulture);
|
||||
sender.Text = val.ToString("G6", System.Globalization.CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
private void VariableAreaClicked(object sender, RoutedEventArgs e)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue