Ejemplo n.º 1
0
 public bool RandomChance(float probabilityTrue)
 {
     return(SquirrelNoise.Get1DNoiseZeroToOne(position++, seed) < probabilityTrue);
 }
Ejemplo n.º 2
0
 public float RandomFloatNegativeOneToOne()
 {
     return(SquirrelNoise.Get1DNoiseNegativeOneToOne(position++, seed));
 }
Ejemplo n.º 3
0
 public float RandomFloatInRange(float lowerInclusive, float upperInclusive)
 {
     return((SquirrelNoise.Get1DNoiseNegativeOneToOne(position++, seed) + 1) * ((upperInclusive - lowerInclusive) / 2) + lowerInclusive);
 }
Ejemplo n.º 4
0
 public float RandomFloatZeroToOne()
 {
     return(SquirrelNoise.Get1DNoiseZeroToOne(position++, seed));
 }
Ejemplo n.º 5
0
 public int RandomIntInRange(int lowerInclusive, int upperInclusive)
 {
     return((int)Math.Floor(SquirrelNoise.Get1DNoiseZeroToOne(position++, seed) * (upperInclusive - lowerInclusive + 1) + lowerInclusive));
 }
Ejemplo n.º 6
0
 public int RandomIntLessThan(int lessThan)
 {
     return((int)Math.Floor(SquirrelNoise.Get1DNoiseZeroToOne(position++, seed) * lessThan));
 }
Ejemplo n.º 7
0
 public int RandomInt()
 {
     return(unchecked ((int)SquirrelNoise.Get1DNoiseUint(position++, seed)));
 }
Ejemplo n.º 8
0
 public uint RandomUInt()
 {
     return(SquirrelNoise.Get1DNoiseUint(position++, seed));
 }