diff options
| author | a1xd <[email protected]> | 2020-12-22 21:51:04 -0500 |
|---|---|---|
| committer | a1xd <[email protected]> | 2020-12-22 21:51:04 -0500 |
| commit | 94671432cbd332e99b92daeaacb4b59a761fb9b3 (patch) | |
| tree | 0be89da26c895d9a52dffde02409bf75952441c8 | |
| parent | fallback on invariant format when parsing fields (diff) | |
| download | rawaccel-94671432cbd332e99b92daeaacb4b59a761fb9b3.tar.xz rawaccel-94671432cbd332e99b92daeaacb4b59a761fb9b3.zip | |
rename tryparse, add type
| -rw-r--r-- | grapher/Models/Fields/Field.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/grapher/Models/Fields/Field.cs b/grapher/Models/Fields/Field.cs index 6f15525..fe5171b 100644 --- a/grapher/Models/Fields/Field.cs +++ b/grapher/Models/Fields/Field.cs @@ -275,7 +275,7 @@ namespace grapher } } - public static bool TryParse(string s, out double res) + public static bool TryParseDouble(string s, out double res) { return double.TryParse(s, Constants.FloatStyle, NumberFormatInfo.CurrentInfo, out res) || double.TryParse(s, Constants.FloatStyle, NumberFormatInfo.InvariantInfo, out res); @@ -283,7 +283,7 @@ namespace grapher private void TextToData() { - if (TryParse(Box.Text, out double value) && + if (TryParseDouble(Box.Text, out double value) && value <= MaxData && value >= MinData) { _data = value; |