js Math 使用一

JS Math.atan2(7,1) 返回x,y点对于原点的弧度 弧度最小0 最大2pi

Math.pow(5,2). 计算5的2方

Math.sqrt(x). 对x开方

asin 反三角函数。sinh双曲线函数

sin正弦值 cos余弦值

1.俩点之间的距离 a(x1,y1) b(x2,y2) (x1-x2)的平方+(y1-y2)恩平方。然后整体开方就是俩点的距离。

2.已知a(x1,y1) b(x2,y2)俩点,得出弧度 Math.atan2(y2-y1,x2-s1);

3.求角度 arctan<a=对边/临边 所以 <a= arctan 对边/临边*180/PI

posted @ 2021-10-14 15:57  meeto  阅读(65)  评论(0)    收藏  举报