The minimal draw surface for the helpers that draw floats only (float, chance,
weighted, weightedKey). A rule whose draws are floats-only implements just this -
no dead int member that must never be called.
Example
import { Random } from'@datamoc/mwg/core'; importtype { FloatSource } from'@datamoc/mwg/core';
// a scripted float-only stream: every draw is data, no integer path exists constscripted: FloatSource = { float: () =>0.25 }; consthit = Random.chance(0.5, scripted);
The minimal draw surface for the helpers that draw floats only (
float,chance,weighted,weightedKey). A rule whose draws are floats-only implements just this - no deadintmember that must never be called.Example