Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Point {
- double x;
- double y;
- void move(double dif_x, double dif_y) {
- x = x + dif_x;
- y = y + dif_y;
- }
- double measureTo(Point p) {
- double Pif = Math.sqrt(((Math.abs(p.x + x)) * ((Math.abs(p.x + x))) + ((Math.abs(p.y + y)) * (Math.abs(p.y + y)))));
- return Pif;
- }
- }
Add Comment
Please, Sign In to add comment