mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Allow , instead of . for decimal separator
This commit is contained in:
parent
c61a746555
commit
15df620951
@ -101,6 +101,7 @@ namespace MCGalaxy {
|
||||
|
||||
// Not all languages use . as their decimal point separator
|
||||
public static bool TryParseDecimal(string s, out float result) {
|
||||
if (s.IndexOf(',') >= 0) s = s.Replace(',', '.');
|
||||
result = 0;
|
||||
float temp;
|
||||
const NumberStyles style = NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite
|
||||
|
Loading…
x
Reference in New Issue
Block a user