求夹角
<P>已知A(xa,ya)、B(xb,yb)、C(xc,yc)三点坐标,如何求取角<ABC得角度?</P> <P>数学问题啊。看下高中的书就是了。</P> <P>高中没学好</P> <P>fwj(Xa-Xb,YA-YB)-fwj(...)</P><P>再判断下大小180度就是了。</P>
<P>Public Function fwj(ByVal x As Double, ByVal y As Double) As Double<BR>If x = 0 Then<BR> If y > 0 Then<BR> fwj = 3.14159265358979 / 2<BR> Else<BR> fwj = 3.14159265358979 * 1.5<BR> End If<BR>Else<BR> fwj = Atn(y / x)<BR> If x > 0 And y > 0 Then fwj = fwj<BR> If x > 0 And y <= 0 Then fwj = 2 * 3.14159265358979 + fwj<BR> <BR> If x < 0 Then fwj = fwj + 3.14159265358979<BR>End If<BR>End Function</P>
页:
[1]