VB Code:
Function Radar(mLine As Line, CentreX As Long, CentreY As Long, Degree As Long, Radius As Double)
Dim Rad As Double
Rad = Degree * (3.1415926 / 180)
With mLine
.X2 = CentreX + Cos(Rad) * Radius
.Y2 = CentreY + Sin(Rad) * Radius
.X1 = CentreX
.Y1 = CentreY
End With
End Function
If you haven't done maths before, here we go. The first line converts the degrees (0 - 359) to Radians. Then, it takes the centre of the circle, and adds the cosine of the radius to it (the horizontal bit). It then multiplies this by the radius to get either a positive or negative value that tells you where the X point is. Same with the Y.