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
47
48
use ;
use ;
/// Convert a p-vector into modulus and unit vector.
///
/// Given:
/// p double[3] p-vector
///
/// Returned:
/// r double modulus
/// u double[3] unit vector
///
/// Notes:
///
/// 1) If p is null, the result is null. Otherwise the result is a unit
/// vector.
///
/// 2) It is permissible to re-use the same array for any of the
/// arguments.
///
/// Called:
/// eraPm modulus of p-vector
/// eraZp zero p-vector
/// eraSxp multiply p-vector by scalar
///
/// This revision: 2021 May 11