LethalCompany/Lethal Company/ExportedProject/Assets/Scripts/Assembly-CSharp/DigitalRuby/ThunderAndLightning/RangeOfFloats.cs

26 lines
462 B
C#
Raw Normal View History

2023-12-22 22:51:17 +00:00
using System;
using UnityEngine;
namespace DigitalRuby.ThunderAndLightning
{
[Serializable]
public struct RangeOfFloats
{
[Tooltip("Minimum value (inclusive)")]
public float Minimum;
[Tooltip("Maximum value (inclusive)")]
public float Maximum;
public float Random()
{
return UnityEngine.Random.Range(Minimum, Maximum);
}
public float Random(System.Random r)
{
return Minimum + (float)r.NextDouble() * (Maximum - Minimum);
}
}
}