Capy-Bearer Documentation

f32

lib call

Capy

function f32(value : as string, opt : dval = {}) f32

f32() converts finite text to a 32-bit floating-point value. Invalid, non-finite, or out-of-range text returns opt.fallback. The default fallback is 0.0.

Parameters

value : scalar value or text to convert

opt : options map with fallback

Return Values

A 32-bit floating-point value, or opt.fallback.

Example

Capy

print(f32("1.5"), "\n")