Skip to main content

angular_separation

Function angular_separation 

Source
pub fn angular_separation(a: [f64; 3], b: [f64; 3]) -> Result<f64, AngleError>
Expand description

On-sky angle (degrees) between two direction vectors, via the stable atan2(|a x b|, a . b) form.

Vectors need not be normalized, but each must be finite, non-zero, and have a finite positive squared norm under dot3. Extreme magnitudes whose squared norm overflows to infinity or underflows to zero are rejected with AngleError::InvalidInput. Fields "a" / "b" identify the offending argument.