21 lines
308 B
C#
21 lines
308 B
C#
namespace Voxus.Random
|
|
{
|
|
public class RandomLinear : AbstractRandom
|
|
{
|
|
private float min;
|
|
|
|
private float max;
|
|
|
|
public RandomLinear(float min, float max)
|
|
{
|
|
this.min = min;
|
|
this.max = max;
|
|
}
|
|
|
|
public override float Get()
|
|
{
|
|
return (float)random.NextDouble() * (max - min) + min;
|
|
}
|
|
}
|
|
}
|