sofars/vm/pmp.rs
1/// P-vector subtraction.
2///
3/// This function is part of the International Astronomical Union's
4/// SOFA (Standards of Fundamental Astronomy) software collection.
5///
6/// Status: vector/matrix support function.
7///
8/// Given:
9/// ```
10/// a double[3] first p-vector
11/// b double[3] second p-vector
12/// ```
13/// Returned:
14/// ```
15/// amb double[3] a - b
16/// ```
17/// Note:
18/// It is permissible to re-use the same array for any of the
19/// arguments.
20pub fn pmp(a: &[f64; 3], b: &[f64; 3]) -> [f64; 3] {
21 [a[0] - b[0], a[1] - b[1], a[2] - b[2]]
22}