toFloat function
convert the input to a float, or NAN if the input is not a float
Implementation
double toFloat(String str) {
try {
return double.parse(str);
} catch (e) {
return double.nan;
}
}
convert the input to a float, or NAN if the input is not a float
double toFloat(String str) {
try {
return double.parse(str);
} catch (e) {
return double.nan;
}
}