Find that angle
#1
a little function to find the angle (measured in radians) from point x1,y1 to point x2,y2

Code: (Select All)
Function Rtan2 (x1, y1, x2, y2)
'========================
' returns an angle in radians between points x1,y1 and x2,y2
    deltaX = x2 - x1
    deltaY = y2 - y1
    rtn = _Atan2(deltaY, deltaX)
    If rtn < 0 Then Rtan2 = rtn + (2 * _Pi) Else Rtan2 = rtn
End Function
Reply


Messages In This Thread
Find that angle - by James D Jarvis - 01-21-2023, 11:12 PM
RE: Find that angle - by OldMoses - 01-22-2023, 12:42 AM
RE: Find that angle - by bplus - 01-22-2023, 12:43 AM



Users browsing this thread: 1 Guest(s)