FastRng/FastRng/Float/Distributions/ExponentialLa10.cs

16 lines
404 B
C#
Raw Normal View History

2020-10-31 23:08:30 +00:00
using System;
namespace FastRng.Float.Distributions
{
public sealed class ExponentialLa10 : Distribution
{
private const float LAMBDA = 10.0f;
private const float CONSTANT = 0.1106f;
public ExponentialLa10(IRandom rng) : base(rng)
{
}
2020-11-08 15:23:05 +00:00
private protected override float ShapeFunction(float x) => CONSTANT * LAMBDA * MathF.Exp(-LAMBDA * x);
2020-10-31 23:08:30 +00:00
}
}