Struct IntRange
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: GameKit.Dependencies.Utilities.Types
Assembly: GameKit.Dependencies.dll
Syntax
[Serializable]
public struct IntRange
Constructors
IntRange(Int32, Int32)
Declaration
public IntRange(int minimum, int maximum)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | minimum | |
System.Int32 | maximum |
Fields
Maximum
Maximum range.
Declaration
public int Maximum
Field Value
Type | Description |
---|---|
System.Int32 |
Minimum
Minimum range.
Declaration
public int Minimum
Field Value
Type | Description |
---|---|
System.Int32 |
Methods
Clamp(Int32)
Returns value clamped within minimum and maximum.
Declaration
public int Clamp(int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value |
Returns
Type | Description |
---|---|
System.Int32 |
RandomExclusive()
Returns an exclusive random value between Minimum and Maximum.
Declaration
public float RandomExclusive()
Returns
Type | Description |
---|---|
System.Single |
RandomInclusive()
Returns an inclusive random value between Minimum and Maximum.
Declaration
public float RandomInclusive()
Returns
Type | Description |
---|---|
System.Single |