public float NextInRange(IRandom0 rand, float from, float to) { if (from > to) { throw new ArgumentException("from > to"); } var d = rand.NextF(); var res = from + (to - from) * d; return((float)res); }
public PerlinNoise(INoiseParameters noiseParameters) { _rand = noiseParameters.Random; _noiseParameters = noiseParameters; }
public VoronoiAreaGenerator(IVoronoiGenerator voronoi, IRandom0 random) { _voronoiGenerator = voronoi; _random = random; _randomHelper = new PropabilityHelperRandom0(); }
public INoiseBuilder Random(IRandom0 rand) { _descriptor.Random = rand; return(this); }