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