mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-21 05:43:10 -07:00
[C# Calc] Fixes: Keep the value away from getting rounded in Graphing Mode (#1596)
* keep the value away from getting rounded * set the display precision to 6 to align with C++ impl
This commit is contained in:
parent
74ef763dfb
commit
4ae898d827
1 changed files with 2 additions and 5 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,9 +543,7 @@ namespace CalculatorApp
|
|||
return;
|
||||
}
|
||||
|
||||
// CSHARP_MIGRATION: TODO:
|
||||
// Due to different culture, some regions use comma instead of dot as the decimal point
|
||||
sender.Text = val.ToString("0", 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