GM_Utility .CalcBearing Method
Calculates the bearing in radians between two points. The points can either be specified as lat/lon values or in the current projection.

Namespace:GlobalMapper
Assembly:  GlobalMapperWrapperNET (in GlobalMapperWrapperNET.dll) Version: 18.0.0.0 (18.0.0.0)

Syntax
C#
Copy
public static GM_Error_t32 CalcBearing(
    double aFromX,
    double aFromY,
    double aToX,
    double aToY,
    GM_CalcBearingFlags_t8 aFlags,
    out double aBearing
)

Parameters

aFromX
Type:  System . Double
IN: start X/longitude coordinate
aFromY
Type:  System . Double
IN: start Y/latitude coordinate
aToX
Type:  System . Double
IN: stop X/longitude coordinate
aToY
Type:  System . Double
IN: stop Y/latitude coordinate
aFlags
Type:  GlobalMapper . GM_CalcBearingFlags_t8
IN: flags controlling coordinate projection and returned bearing sense
aBearing
Type:  System . Double
OUT: bearing in radians between the points

Return Value

Type:  GM_Error_t32
A GM Error Code
See Also