android tech.
두 점의 거리
zimamdero
2016. 12. 5. 13:14
int dX = targetX - centerX;
int dY = targetY - centerY;
int distance = (int)Math.sqrt(Math.pow(Math.abs(dX), 2) + Math.pow(Math.abs(dY), 2));