Files
GameVsJam/3d Prototyp/Assets/Scripts/Utility/TimeSpanExtension.cs
2024-04-05 13:54:45 +02:00

17 lines
411 B
C#

using System;
namespace Utility
{
public static class TimeSpanExtension
{
public static bool IsBetween(this TimeSpan value, TimeSpan start, TimeSpan end)
{
if (start > end)
{
throw new ArgumentException(nameof(start), "start must be before end.");
}
return value >= start && value <= end;
}
}
}