class Program
{
static void Main()
{
//while (true)
//{
Console.SetCursorPosition(0, 0);
Console.Write("initialVelocity_x:");
double initialVelocity_x = int.Parse(Console.ReadLine()); // r.Next(10, 20);
Console.Write("initialVelocity_y:");
double initialVelocity_y = int.Parse(Console.ReadLine()); // r.Next(5, 20);
physics.Ball ball=
new physics.Ball(initialVelocity_x, initialVelocity_y);
Console.WriteLine("return_time={0}", ball.CalculateReturnTime());
ball.PrintPath();
Console.SetCursorPosition(0, 3);
while(true){
Console.Write("enter some time t:");
double t=double.Parse(Console.ReadLine());
ball.GetPositionUnderGravityAtTime(t);
Console.WriteLine("x={0},y={1}", ball.X, ball.Y);
}
}
}
Last active
August 29, 2015 14:08
-
-
Save hamoungh/f444b8bf164c685aa70a to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment