private bool GetFloatValue(ElementRuntime elementRuntime, FunctionArgs args, string variableName)
{
float valueToSet = float.NaN;
bool wasSet = false;
switch (variableName)
{
case "PositiveInfinity":
valueToSet = float.PositiveInfinity;
wasSet = true;
break;
case "NegativeInfinity":
valueToSet = float.NegativeInfinity;
wasSet = true;
break;
case "MaxValue":
valueToSet = float.MaxValue;
wasSet = true;
break;
case "MinValue":
valueToSet = float.MinValue;
wasSet = true;
break;
}
if (wasSet)
{
args.Result = valueToSet;
}
return wasSet;
}