Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.stsci.edu/~sontag/spicedocs/cspice/vupack_c.html
Дата изменения: Sat Dec 17 06:10:13 2005 Дата индексирования: Mon Apr 11 00:12:47 2016 Кодировка: Поисковые слова: внешние планеты |
Pack three scalar components into a vector.
None.
VARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- v I 3-vector. x, y, z O Scalar components of 3-vector.
v is a double precision 3-vector.
x, y, z are the scalar components of the 3-vector v. On output, the following equalities hold: x = v[0] y = v[1] z = v[2]
None.
Basically, this is just shorthand notation for the common sequence x = v[0]; y = v[1]; z = v[2] ; The routine is useful largely for two reasons. First, it reduces the chance that the programmer will make a "cut and paste" mistake, like x = v[0]; y = v[0]; z = v[0]; Second, it makes conversions between equivalent units simpler, and clearer. For instance, the sequence x = v[0] * rpd_c(); y = v[1] * rpd_c(); z = v[2] * rpd_c(); can be replaced by the (nearly) equivalent sequence vscl_c ( rpd_c(), v, v ); vupack_c ( v, &x, &y, &z );
See: Detailed_Description.
None.
Error free.
None.
N.J. Bachman (JPL) I.M. Underwood (JPL)
None.
-CSPICE Version 1.0.0, 28-JUN-1999 (IMU) (NJB)
unpack three scalar components from a vector