abey79 / vsvg

Fast and portable tools for plotter users
http://whisk.rs
MIT License
111 stars 13 forks source link

Add `ctx.rng_{weighted|ratio}_bool()` helper functions #124

Closed abey79 closed 8 months ago

abey79 commented 8 months ago

This PR adds to functions to whiskers::Context:

The latter variant is useful for when dealing with, e.g., column or row index:

let some_bool = ctx.rng_ratio_bool(current_columns, (total_column - 1));