Method RandomRange
RandomRange(Single, Single)
Get a random decimal number between min and max inclusive
Declaration
public static float RandomRange(float min, float max)
Parameters
Type | Name | Description |
---|---|---|
System.Single | min | Minimum value [inclusive] |
System.Single | max | Maximum value [inclusive] |
Returns
Type | Description |
---|---|
System.Single | Decimal number between min and max |
RandomRange(Int32, Int32)
Get a random integer value between min [inclusive] and max [exclusive]
Declaration
public static int RandomRange(int min, int max)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | min | Minimum value [inclusive] |
System.Int32 | max | Maximum value [exclusive] |
Returns
Type | Description |
---|---|
System.Int32 |