Skip to content

Instantly share code, notes, and snippets.

@hamoungh
Last active August 29, 2015 14:08
Show Gist options
  • Save hamoungh/cfcb57e448b482a66a80 to your computer and use it in GitHub Desktop.
Save hamoungh/cfcb57e448b482a66a80 to your computer and use it in GitHub Desktop.
class Program
{
static void Main()
{
double initialVelocity_x = 20;
double initialVelocity_y = 14;
physics.Ball ball=
new physics.Ball(initialVelocity_x, initialVelocity_y);
double time=ball.CalculateReturnTime();
Console.WriteLine("return time={0}", time);
ball.GetPositionUnderGravityAtTime(1.1);
Console.WriteLine("x={0},y={1}", ball.X, ball.Y);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment