完善「Val_Double」方法的运算逻辑
This commit is contained in:
@@ -720,10 +720,10 @@ namespace Deedy.Testing
|
||||
private double Val_Double(object rawValue)
|
||||
{
|
||||
if (rawValue is double tValue) return tValue;
|
||||
string paramExp = rawValue?.ToString() ?? "0";
|
||||
object valueExp = paramExp.StartsWith('@') ? this.ParamGetter(paramExp, 0) : paramExp;
|
||||
string paramExp = rawValue?.ToString() ?? "0";
|
||||
if (double.TryParse(paramExp, out double dValue)) return dValue;
|
||||
object valueExp = this.ParamGetter(paramExp, 0);
|
||||
if (valueExp is double pValue) return pValue;
|
||||
if (double.TryParse(valueExp.ToString(), out double dValue)) return dValue;
|
||||
return 0;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -1142,4 +1142,4 @@ namespace Deedy.Testing
|
||||
return @default;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user