Beispiel #1
0
 public RandFloatBox_Between(float na, float nb, RandFloatSource s) : base(s)
 {
     a = na;
     b = nb;
 }
Beispiel #2
0
 public RandVectorI2Source(RandFloatSource s)
 {
     source = s;
 }
Beispiel #3
0
 public RandFloatBox(RandFloatSource s)
 {
     source = s;
 }
Beispiel #4
0
 public RouletteWheel(RandFloatSource s, params KeyValuePair <T, float>[] i) : this(s, (IEnumerable <KeyValuePair <T, float> >)i)
 {
 }
Beispiel #5
0
 public RouletteWheel(RandFloatSource s, IEnumerable <KeyValuePair <T, float> > i) : this(s, new Roulette <T>(i))
 {
 }
Beispiel #6
0
 public RouletteWheel(RandFloatSource s, Roulette <T> r)
 {
     roulette     = r;
     float_source = s;
 }
Beispiel #7
0
 public RandChanceSource(RandFloatSource s)
 {
     source = s;
 }
Beispiel #8
0
        static public T PickRandom <T>(this IList <T> item, Operation <double, T> operation, RandFloatSource source)
        {
            double total_cost = item.GetCost(operation);

            return(item.GetElementForCost(source.GetBetween(0.0f, (float)total_cost), BoundType.Below, operation));
        }