LethalCompany/Lethal Company/ExportedProject/Assets/Scripts/Assembly-CSharp/DunGen/FloatRange.cs

35 lines
444 B
C#
Raw Normal View History

2023-12-22 22:51:17 +00:00
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;
}
}
}