C# Class WeightedRandom, NGTools

Gets a weighted random number Usage float y = WeightedRandom.GetRandomValue( new WeightedRandom.RandomSelection(100f, 80f , 0.20f), new WeightedRandom.RandomSelection(80f, 60f, 0.40f), new WeightedRandom.RandomSelection(60f , 30f, 0.30f), new WeightedRandom.RandomSelection(30f , 0f , 0.10f) );
Datei anzeigen Open project: Naphier/NGTools Class Usage Examples

Public Methods

Method Description
GetRandomValue ( ) : float

Method Details

GetRandomValue() public static method

public static GetRandomValue ( ) : float
return float