pub fn calculate_sphere_bearing<T>(point_a: Point2<T>, point_b: Point2<T>) -> T
Expand description
Calculates the initial bearing (forward azimuth) from the first point to the second point.
This function computes the initial bearing, or forward azimuth, between two points on the surface of a sphere, assuming a spherical model. The bearing is the direction one must travel from the first point to reach the second point, expressed as an angle from North (0 radians) in a clockwise direction.
§Arguments
point_a
: APoint2
representing the starting geographical point (latitude and longitude).point_b
: APoint2
representing the destination geographical point (latitude and longitude).
§Generics
§Returns
- A value that representing the initial bearing from
point_a
topoint_b
, in radians, The result is normalized to a range of 0 to 2 PI radians.