FastRng/FastRng/Distributions/ExponentialLa10.cs
2023-07-06 10:26:12 +02:00

15 lines
360 B
C#

using System;
namespace FastRng.Distributions;
public sealed class ExponentialLa10 : Distribution
{
private const float LAMBDA = 10.0f;
private const float CONSTANT = 0.1106f;
public ExponentialLa10(IRandom rng) : base(rng)
{
}
private protected override float ShapeFunction(float x) => CONSTANT * LAMBDA * MathF.Exp(-LAMBDA * x);
}