/**
* @Title: getVerticalVal
* @Description: TODO(海伦公式求三角形垂线长度)
* @param a 长度
* @param b 长度
* @param c 长度
* @return double 返回垂直线长度 
* @throws 
*/ 
private static double getVerticalVal(Double a,Double b,Double c){
double p=(a+b+c)/2;
double k=p*(p-a)*(p-b)*(p-c);
double s=Math.sqrt(k);
return 2*s/a;
}

public static void main(String[] args) {
System.out.println(getVerticalVal(3d,4d,5d));
}

 

相关文章:

  • 2022-12-23
  • 2021-12-19
  • 2021-09-24
  • 2021-12-26
  • 2021-06-26
  • 2021-06-26
  • 2021-11-01
  • 2021-12-19
猜你喜欢
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案