1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
use crate;
/// Angular separation between two p-vectors.
///
/// This function is part of the International Astronomical Union's
/// SOFA (Standards of Fundamental Astronomy) software collection.
///
/// Status: vector/matrix support function.
///
/// Given:
/// a double[3] first p-vector (not necessarily unit length)
/// b double[3] second p-vector (not necessarily unit length)
///
/// Returned (function value):
/// double angular separation (radians, always positive)
///
/// Notes:
///
/// 1) If either vector is null, a zero result is returned.
///
/// 2) The angular separation is most simply formulated in terms of
/// scalar product. However, this gives poor accuracy for angles
/// near zero and pi. The present algorithm uses both cross product
/// and dot product, to deliver full accuracy whatever the size of
/// the angle.
///
/// Called:
/// iauPxp vector product of two p-vectors
/// iauPm modulus of p-vector
/// iauPdp scalar product of two p-vectors
///