comment pass
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
namespace EscapeRoomEngine.Engine.Runtime.Utilities
|
||||
{
|
||||
/// <summary>
|
||||
/// This struct represents an integer range.
|
||||
/// </summary>
|
||||
public struct Range
|
||||
{
|
||||
public int min, max;
|
||||
|
||||
/// <summary>
|
||||
/// The length of the range, excluding the maximum value.
|
||||
/// </summary>
|
||||
public int Length => max - min;
|
||||
|
||||
public Range(int min, int max)
|
||||
@@ -12,6 +18,9 @@
|
||||
this.max = max;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create an array of every value in this range.
|
||||
/// </summary>
|
||||
public int[] ToArray(bool includeMax = false)
|
||||
{
|
||||
var count = includeMax ? Length + 1 : Length;
|
||||
|
||||
Reference in New Issue
Block a user