写一段VBA代码,已知两点的坐标,如何计算两点的连线与x轴的夹角
时间: 2023-03-14 22:03:35 浏览: 139
已知ABC三点坐标,得到A点到BC的最近距离
Sub Calculate_Angle(x1 As Single, y1 As Single, x2 As Single, y2 As Single)
Dim Angle As Single
Angle = Atn(y2 - y1 / x2 - x1) * (180 / 3.14159)
MsgBox Angle
End Sub
阅读全文