//已知角度和斜边,求直角边
function hypotenuse(long,angle){
    //获得弧度
    var radian = 2*Math.PI/360*angle;
    return {
        a:Math.sin(radian) * long,//邻边
        b:Math.cos(radian) * long//对边
    };
}
console.log(hypotenuse(1,45));

 

相关文章:

  • 2021-08-26
  • 2021-11-10
  • 2021-12-19
  • 2021-12-19
  • 2021-10-24
  • 2021-12-26
  • 2021-05-17
  • 2021-07-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-17
相关资源
相似解决方案