@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		TwoPoints other = (TwoPoints) obj;
		if (!((p1.equals(other.p1) && p2.equals(other.p2)) ||
				(p1.equals(other.p2) && p2.equals(other.p1))))
			return false;
		return true;
	}