Struct ByteRange
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 ByteRange
Constructors
ByteRange(Byte, Byte)
Declaration
public ByteRange(byte minimum, byte maximum)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte | minimum | |
| System.Byte | maximum |
Fields
Maximum
Maximum range.
Declaration
public byte Maximum
Field Value
| Type | Description |
|---|---|
| System.Byte |
Minimum
Minimum range.
Declaration
public byte Minimum
Field Value
| Type | Description |
|---|---|
| System.Byte |
Methods
Clamp(Byte)
Clamps value between Minimum and Maximum.
Declaration
public byte Clamp(byte value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte | value |
Returns
| Type | Description |
|---|---|
| System.Byte |
InRange(Byte)
True if value is within range of Minimum and Maximum.
Declaration
public bool InRange(byte value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte | value |
Returns
| Type | Description |
|---|---|
| System.Boolean |
RandomExclusive()
Returns an exclusive random value between Minimum and Maximum.
Declaration
public byte RandomExclusive()
Returns
| Type | Description |
|---|---|
| System.Byte |
RandomInclusive()
Returns an inclusive random value between Minimum and Maximum.
Declaration
public byte RandomInclusive()
Returns
| Type | Description |
|---|---|
| System.Byte |