package example1;

public class Point {
	private double x;
	private double y;

	public Point() {
		this.x = 0;
		this.y = 0;
	}
	
	public Point(double x, double y) {
		this.x = x;
		this.y = y;
	}

	@Override
	public String toString() {
		return "Point a: " + x + ", b: " + y;
	}

	public static double getDistanceFromOrig(Point p) {
		return Math.sqrt(Math.pow(0 - p.x, 2) + Math.pow(0 - p.y, 2));
	}

	public static double getTwoDistance(Point p1, Point p2) {
		return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));
	}

}