/rust/registry/src/index.crates.io-1949cf8c6b5b557f/sofars-0.6.1/src/vm/ppp.rs
Line | Count | Source |
1 | | /// P-vector addition. |
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 | | /// |
14 | | /// Returned: |
15 | | /// ``` |
16 | | /// apb double[3] a + b |
17 | | /// ``` |
18 | | /// |
19 | | /// Note: |
20 | | /// It is permissible to re-use the same array for any of the |
21 | | /// arguments. |
22 | | #[inline] |
23 | 0 | pub fn ppp(a: &[f64; 3], b: &[f64; 3]) -> [f64; 3] { |
24 | 0 | [a[0] + b[0], a[1] + b[1], a[2] + b[2]] |
25 | 0 | } |