Overview
The toFloat()
function converts a value to a single-precision floating-point number.
When converting a textual value, the function only returns a valid result if the text begins with a number; otherwise, it returns 0
.
When provided with a NODE or EDGE value, the function returns its UUID.
For unsupported value types, the function returns null
.
Syntax
toFloat(value)
Augment |
Type |
Description |
---|---|---|
value |
Numerical, textual, timestamp, boolean, NODE, EDGE | The value to be converted |
Return type: Float
Example of Result
return toFloat("2023.03.02")
Result: 2023.03
return toFloat("3.1415926ABC")
Result: 3.141593