FastRng/FastRng/Float/Distributions/InverseExponentialLa10.cs

16 lines
432 B
C#
Raw Normal View History

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