UNPKG

tycho-solver

Version:

Evolutionary computation and optimization library

16 lines 439 B
/** * Utility functions for Tycho Solver */ export function random(min, max, rng) { const r = rng ? rng.random() : Math.random(); return min + r * (max - min); } /** * Generates a random integer between min and max (inclusive) */ export function randomInt(min, max, rng) { return Math.floor(random(min, max + 1, rng)); } export { RNG, seededRandom } from './rng'; export * from './logger'; //# sourceMappingURL=index.js.map