Advertisement
Guest User

Untitled

a guest
Jan 30th, 2015
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. void update_coordinate_rome(double &x, double &y, double v_x, double v_y, double t) {
  2.  
  3. x = x + v_x * t;
  4. y = y + (v_y * t - (0.5) * (9.81) * pow(t,2));
  5.  
  6. }
  7.  
  8. void update_coordinate_vis(double &x, double &y, double v_x, double v_y, double t) {
  9. x = x + v_x * t;
  10. y = y + (v_y * t - (0.5) * (9.81)* pow(t,2));
  11.  
  12. }
  13.  
  14. double distance(double x1, double y1, double x2, double y2) {
  15. double distan;
  16. distan = sqrt((pow((x1-x2),2) + pow((y1-y2),2)));
  17. return distan;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement