CSharp examples for Microsoft.Xna.Framework:Xna
Get Xna Random Direction
using Microsoft.Xna.Framework; using System;//from w w w . j a v a 2 s. co m public class Main{ public static Vector2 GetRandomDirection(Random random) { double azimuth = random.NextDouble() * 2 * System.Math.PI; return new Vector2((float) System.Math.Cos(azimuth), (float) System.Math.Sin(azimuth)); } }