Struct IntRange
Represents a range between two signed integers
public readonly struct IntRange
- Inherited Members
Constructors
IntRange(int, int)
Creates a new instance of the IntRange class
[JsonConstructor]
public IntRange(int start, int end)
Parameters
Properties
End
Gets the end value of the range
public int End { get; }
Property Value
Start
Gets the start value of the range
public int Start { get; }
Property Value
Methods
GetRandomValue(bool)
public int GetRandomValue(bool inclusive = true)
Parameters
Returns
- int
The pseudo-random value
IsInRange(int, bool)
Determines whether the given value is in this range
public bool IsInRange(int value, bool inclusive = true)
Parameters
valueintThe value to check
inclusiveboolWhether the value may be equal to Start or End
Defaults to true