これって駄目ですか?コンパイラに^使うなボケといわれました。

r = (int)Math.sqrt((double)((p[0].getX()-p[1].getX())^2+(p[0].getY()-p[1].getY())^2));