Casts an expression to a float.
float(x:any) -> floatDescription
Section titled “Description”The float function converts the given value x to a floating-point value.
Examples
Section titled “Examples”Cast an integer to a float
Section titled “Cast an integer to a float”from {x: float(42)}{x: 42.0}Cast a string to a float
Section titled “Cast a string to a float”from {x: float("4.2")}{x: 4.2}