RandomUtility¶
Namespace:
SideXP.Core
Utility functions for random behaviors.
Methods¶
RandomAmong(object[])¶
Gets a random value among the given ones.
Parameters
values: The values that can be picked at random.
Returns
Returns the randomly picked value, or null if no value is provided.
RandomAmong<T>(T[])¶
Gets a random value among the given ones.
Type parameters
T: The type of the values to pick at random.
Parameters
values: The values that can be picked at random.
Returns
Returns the randomly picked value, or the default value of T if no value is provided.