import java.util.*;
public class Solution {
/**
* 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
*
* 计算A点与B点之间的距离
* @param point_A Point类 A点
* @param point_B Point类 B点
* @return double浮点型
*/
public double calculateDistance (Point point_A, Point point_B) {
double x = Math.pow(point_A.x-point_B.x,2);
double y =Math.pow(point_A.y-point_B.y,2);
double d = Math.pow(x+y,0.5);
return d;
}
}
class point{
public int x;
public int y;
point(int x,int y){
this.x = x;
this.y = y;
}
}

京公网安备 11010502036488号