LethalCompany/Lethal Company/ExportedProject/Assets/Scripts/Assembly-CSharp/DunGen/FloatRange.cs
2023-12-22 18:30:10 -05:00

34 lines
444 B
C#

using System;
namespace DunGen
{
[Serializable]
public class FloatRange
{
public float Min;
public float Max;
public FloatRange()
{
}
public FloatRange(float min, float max)
{
Min = min;
Max = max;
}
public float GetRandom(RandomStream random)
{
if (Min > Max)
{
float min = Min;
Min = Max;
Max = min;
}
float num = Max - Min;
return Min + (float)random.NextDouble() * num;
}
}
}