using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace ShootingHero
{
	public static class MathHelper
	{
		public static float Distance ( Vector2 v1, Vector2 v2 )
		{
			return ( float ) Math.Sqrt ( Math.Pow ( v2.X - v1.X, 2 ) + Math.Pow ( v2.Y - v1.Y, 2 ) );
		}

		public static Vector2 GetMoveUnit ( Vector2 v1, Vector2 v2 )
		{
			float angle = ( float ) Math.Atan2 ( v2.Y - v1.Y, v2.X - v1.X );
			return new Vector2 ( ( float ) Math.Sin ( angle ), ( float ) Math.Cos ( angle ) );
		}
	}
}
