java 计算两点直接距离比较
/***
	 * 比较两点坐标
	 */
	public  int  getXyCm(double x1,double y1,double x2, double y2,double x3 ,double y3) {
		
		
		double a= Math.sqrt(Math.pow((x1-x2),2)+Math.pow((y1-y2),2));
		System.out.println( Math.abs(a));
		double b= Math.sqrt(Math.pow((x1-x3),2)+Math.pow((y1-y3),2));
		System.out.println( Math.abs(b));
		if(Math.abs(a)>Math.abs(b)) {
				System.out.println("BBB");
			return 1;
		}else {
			System.out.println("aaaa");
			return 0;
		}
	}
 
                    
                 
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号