allow entering numbers with digit separator into value boxes (f.e. 1_000)

This commit is contained in:
Saas
2025-10-11 22:02:14 +02:00
parent 8da0d2c4ce
commit b2b855200f

View File

@@ -444,6 +444,9 @@ namespace FlaxEditor.Utilities
/// <returns>The result value.</returns>
public static double Parse(string text)
{
// Hack to allow parsing numbers while using "_" as a separator (like this: 1_000)
text = text.Replace("_", string.Empty);
var tokens = Tokenize(text);
var rpn = OrderTokens(tokens);
return EvaluateRPN(rpn);