Skip to content

ToFloat

Name - Description Default Type
<input> Any
<output> Any

Details

This shard typecasts integer and string numeric values into the single float data type (float).

Examples

1
2
3
4
5
6
7
8
1 (ToFloat) (Log)
(Assert.Is 1.0 :Abort true)

2.2 (ToFloat) (Log)
(Assert.Is 2.2 :Abort true)

"3" (ToFloat) (Log)
(Assert.Is 3.0 :Abort true)
[info] [shards/General/ToFloat/1.edn] 1
[info] [shards/General/ToFloat/1.edn] 2.2
[info] [shards/General/ToFloat/1.edn] 3