double distanceTo(Point a){
        double newx, newy, dist;
        if((this.x < 0 && a.x >= 0) || (this.x >= 0 && a.x < 0)){
            newx = Math.abs(this.x) + Math.abs(a.x);
        }
        else{
            newx = this.x - a.x;
        }
        if((this.y < 0 && a.y >= 0) || (this.y >= 0 && a.y < 0)){
            newy = Math.abs(this.y) + Math.abs(a.y);
        }
        else{
            newy = this.y - a.y;
        }
        dist = Math.sqrt((newx * newx) + (newy * newy));
        return dist;
    }