public TravelNode GenerateTravelNode(float xPos, float yPos, StarSystem destination) { TravelNode newNode = new TravelNode(); newNode.StarSystem = destination; float x = destination.X - xPos; float y = destination.Y - yPos; newNode.Length = (float)Math.Sqrt((x * x) + (y * y)); newNode.Angle = (float)(Math.Atan2(y, x) * (180 / Math.PI)); return newNode; }