Example #1
0
	private void RandomPowerValues()
	{
		CleanUp();
		DebugStreamer.AddMessage("Returns a power law pseudo-random number between 0.0 [inclusive] and 1.0 [inclusive]");
		DebugStreamer.AddMessage("MTRandom mrand = new MTRandom(seed)");
		mrand = new MTRandom(user_seed);
		DebugStreamer.AddMessage("mrand.valuePower(" + temperature.ToString() + ")");
		for (int i = 0; i < max_objects; i++)
		{
			float x = mrand.valuePower(temperature);
			float x_position = MTRandom.ScaleFloatToRange(x, -2.0f, 2.0f, 0.0f, 1.0f);
			GameObject sphere = MakeObject(new Vector3(x_position,x_position,0.0f));
			sphere.name = x.ToString();
		}
	}