NoiseEngine/CubicNoise/Noisers/RandomNumberEngine.cs

28 lines
554 B
C#
Raw Normal View History

2020-01-11 18:00:46 +00:00
using System;
using System.Collections.Generic;
using System.Text;
using CubicNoise.Contracts;
namespace CubicNoise.Noisers
{
public sealed class RandomNumberEngine : INoiseEngine
{
private Random rng;
public RandomNumberEngine(int seed)
{
this.rng = new Random(seed);
}
public float Get(float x)
{
return this.rng.Next();
}
public float Get(float x, float y)
{
return this.rng.Next();
}
}
}