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