Угол находится как разница дирекционндых углов
Public Function DirAngle(y1 As Double, y2 As Double, x1 As Double, x2 As Double) As Double
Dim pi As Double
Dim pPoint1 As IPoint, pPoint2 As IPoint
Dim pVector As IVector3D
pi = 4 * Atn(1)
Set pPoint1 = New Point
Set pPoint2 = New Point
pPoint1.x = x1
pPoint2.x = x2
pPoint1.y = y1
pPoint2.y = y2
Set pVector = New Vector3D
pVector.ConstructDifference pPoint2, pPoint1
DirAngle = pVector.Azimuth
DirAngle = DirAngle * 360 / (2 * pi)
End Function
Public Function Angle(x1 As Double, x2 As Double, y1 As Double, y2 As Double, X3 As Double, X4 As Double, Y3 As Double, Y4 As Double) As Double
Angle = 180 + DirAngle(X3, X4, Y3, Y4) - DirAngle(x1, x2, y1, y2)
If Angle > 360 Then
Angle = Angle - 360
ElseIf (Angle < 0) Then
Angle = Angle + 360
End If
End Function