Astrolabe/API GetDirectionToIcon
From Esamynn's Wiki
Astrolabe ยป Astrolabe/API GetDirectionToIcon
Returns the direction to the specified icon, as last calculated by the positioning system.
direction = Astrolabe:GetDirectionToIcon( icon )
[edit]
Arguments
- icon
- UI Widget - the icon for which the information is to be retrieved for
[edit]
Returns
- direction
- Number - the direction from the player to the icon in radians, starting from North and going counter-clockwise
[edit]
Details
This function is meant to be a quick way to retrieve the approximate direction to an icon, on the assumption that the last numbers used by the update system should be "good enough" in most cases. The convention of starting from North and going counter-clockwise is used because this is the convention used when rotating models in the Blizzard widget API.
This funciton will return nil for all arguments if the specified icon is not currently in the positioning buffer.

