monkeyslut45

Кирилл Деменев

Dec 10th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.33 KB | None | 0 0
  1.  
  2. public class Point {
  3.     double x;
  4.     double y;
  5.     void move(double dif_x, double dif_y) {
  6.         x = x + dif_x;
  7.         y = y + dif_y;
  8.     }
  9.     double measureTo(Point p) {
  10.         double Pif = Math.sqrt(((Math.abs(p.x + x)) * ((Math.abs(p.x + x))) + ((Math.abs(p.y + y)) * (Math.abs(p.y + y)))));
  11.         return Pif;
  12.     }
  13. }
Add Comment
Please, Sign In to add comment