UNPKG

randiny

Version:

<h1 style="margin-bottom: 0">Randiny</h1> <h2 style="font-size: 14px; margin-top: 0">A pseudo random number generator, capable of generating random numbers, and noise maps.</h2>

20 lines (16 loc) 376 B
import RNG, {RNGCapture} from "./RNG"; export default class RandomNumber { private readonly capturedRNG: RNGCapture; constructor(private readonly rng: RNG, private readonly value: number) { this.capturedRNG = rng.capture(); } get() { return this.value; } getRNG() { return this.rng; } getCapturedRNG() { return this.capturedRNG; } }