Files
glitchy-engine-beef/ScriptCore/Editor/RangeAttribute.cs
T

18 lines
412 B
C#

using System;
namespace GlitchyEngine.Editor;
public sealed class RangeAttribute : Attribute
{
public double Min { get; set; }
public double Max { get; set; }
public RangeAttribute(double min, double max)
{
if (max < min)
throw new ArgumentOutOfRangeException(nameof(max), $"{nameof(max)} must be larger than {nameof(min)}.");
Min = min;
Max = max;
}
}