@Test
	public void distanceTest() {
		Point p1 = new Point(0,0);
		Point p2 = new Point(3, 4);
		Point p3 = new Point(-3, -4);
		assertEquals(5, p1.distance(p2), PRECISION);
		assertEquals(5, p2.distance(p1), PRECISION);
		assertEquals(5, p1.distance(p3), PRECISION);
		assertEquals(5, p3.distance(p1), PRECISION);
		
		//same both ways
		for (int i = 0; i < TESTS; i++) {
			p1 = new Point(rand.nextInt(), rand.nextInt());
			p2 = new Point(rand.nextInt(), rand.nextInt());
			assertEquals(p1.distance(p2), p2.distance(p1), 0.00001);
		}
	}