Converts value into float or returns 0 when conversion is not possible.
the value to convert.
float value or 0 when conversion is not supported.
Converts value into float or returns default when conversion is not possible.
the value to convert.
the default value.
float value or default value when conversion is not supported.
Converts value into float or returns null when conversion is not possible.
the value to convert.
float value or null when conversion is not supported.
Generated using TypeDoc
Converts arbitrary values into float using extended conversion rules:
Example
let value1 = FloatConverter.toNullableFloat("ABC"); // Result: null let value2 = FloatConverter.toNullableFloat("123.456"); // Result: 123.456 let value3 = FloatConverter.toNullableFloat(true); // Result: 1 let value4 = FloatConverter.toNullableFloat(new Date()); // Result: current milliseconds