vpack_c

Index Page vpack_c
A B C D E F G H I J K L M N O P Q R S T U V W X
Procedure Abstract Required_Reading Keywords Brief_I/O Detailed_Input | Detailed_Output Parameters Exceptions Files Particulars Examples | Restrictions Literature_References Author_and_Institution Version Index_Entries
#### Procedure
       void vpack_c ( SpiceDouble   x,
                      SpiceDouble   y,
                      SpiceDouble   z,
                      SpiceDouble   v[3] )
#### Abstract
       Pack three scalar components into a vector.
#### Required_Reading
       None.
#### Keywords
       VECTOR
#### Brief_I/O
       VARIABLE  I/O  DESCRIPTION
       --------  ---  --------------------------------------------------
       x,
       y,
       z          I   Scalar components of a 3-vector.
       v          O   Equivalent 3-vector.
#### Detailed_Input
       x,
       y,
       z           are the scalar components of a 3-vector.
#### Detailed_Output
       v           is the equivalent vector, such that v[0] == x
                                                       v[1] == y
                                                       v[2] == z
#### Parameters
       None.
#### Exceptions
       Error free.
#### Files
       None.
#### Particulars
       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 );
#### Examples
       See: Detailed_Description.
#### Restrictions
       None.
#### Literature_References
       None.
#### Author_and_Institution
       N.J. Bachman    (JPL)
       I.M. Underwood  (JPL)
#### Version
       -CSPICE Version 1.0.0, 24-MAY-1999 (IMU) (NJB)
#### Index_Entries
       pack three scalar components into a vector
#### Link to routine vpack_c source file vpack_c.c

    Thu Apr 16 08:59:33 2009