Skip to content

float

Casts an expression to a float.

float(x:any) -> float

The float function converts the given value x to a floating-point value.

from {x: float(42)}
{x: 42.0}
from {x: float("4.2")}
{x: 4.2}

int, uint, time, string, ip