pub fn position_angle(from: Equatorial, to: Equatorial) -> AngleExpand description
Position angle from from to to, measured East of North, in [0, 360)°.
At the celestial poles every direction is “south”/“north”; the atan2 convention there yields a defined (if arbitrary) angle rather than NaN.
use skymath::{position_angle, Equatorial, ParseMode};
let m31 = Equatorial::parse_j2000("00:42:44.3", "+41:16:09", ParseMode::Strict)?;
let m110 = Equatorial::parse_j2000("00:40:22.1", "+41:41:07", ParseMode::Lenient)?;
// M110 sits west and slightly north of M31.
assert!((180.0..360.0).contains(&position_angle(m31, m110).degrees()));