gen_noise
host callCapy
function gen_noise(min : any, max : min::type, index : u64, seed : u64) min::type
Description
gen_noise() returns deterministic noise for the range values, index, and seed.
Only u64 and f64 bounds are supported. Integer bounds are inclusive.
Float generation uses the existing fixed precision. The function does not accept a precision parameter.
Use the same inputs to reproduce a value.
Parameters
min : first range value
max : second range value
index : deterministic input position
seed : deterministic input seed
Return Values
A deterministic value with the same type as min.
Example
Capy
var integer := gen_noise(u64(1), u64(10), u64(1), u64(2)) var floating := gen_noise(0.0, 1.0, u64(1), u64(2)) print(integer, " ", floating, "\n")