Exemple #1
0
	private void RandomNormValues()
	{
		CleanUp();
		DebugStreamer.AddMessage("Returns a normalized 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.valueNorm(" + temperature.ToString() + ")");
		for (int i = 0; i < max_objects; i++)
		{
			float x = mrand.valueNorm(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();
		}
	}