at holds no cursor: it is a pure function of the seed and the path, safe to
call in any order, any number of times, from anywhere in a generator. Its
draws are independent of deriveSeed at the same path, so a generator
may seed a sub-part and take a positional draw at one position without
getting the same number twice.
Parameters
seed: number
The seed; an integer in 0..0xffffffff, typically from
deriveSeed.
import { createPositionalRng, deriveSeed } from'@libraz/libcantus'; constrng = createPositionalRng(deriveSeed(42, 'drums')); rng.at('ghost', 4, 2.5); // the same value however often it is asked for
Create a position-addressed random source.
atholds no cursor: it is a pure function of the seed and the path, safe to call in any order, any number of times, from anywhere in a generator. Its draws are independent of deriveSeed at the same path, so a generator may seed a sub-part and take a positional draw at one position without getting the same number twice.