Capy-Bearer Documentation

draw_float

host call

Capy

function draw_float(from : f64, to : f64, precision : f64 = 0.000000000001) f64

Description

draw_float() returns the next floating-point value from the request random sequence.

Bearer uses the request random seed and advances the random index after each call.

Parameters

from : the first range value

to : the second range value

precision : the output precision

Return Values

An f64 value between the range values.

Example

Capy

var value := draw_float(0.0, 1.0)
print(value >= 0.0, "\n")