vdot_c

Index Page vdot_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
       SpiceDouble vdot_c ( ConstSpiceDouble   v1[3],
                            ConstSpiceDouble   v2[3] )
#### Abstract
       Compute the dot product of two double precision, 3-dimensional
       vectors.
#### Required_Reading
       None.
#### Keywords
       VECTOR
#### Brief_I/O
       VARIABLE  I/O  DESCRIPTION
       --------  ---  --------------------------------------------------
       v1         I   First vector in the dot product.
       v2         I   Second vector in the dot product.

       The function returns the value of the dot product of v1 and v2.
#### Detailed_Input
        v1      This may be any 3-dimensional, double precision vector.

        v2      This may be any 3-dimensional, double precision vector.
#### Detailed_Output
       The function returns the value of the dot product of v1 and v2.
#### Parameters
       None.
#### Exceptions
       Error free.
#### Files
       None.
#### Particulars
       vdot_c calculates the dot product of v1 and v2 by a simple
       application of the definition.  No error checking is performed to
       prevent numeric overflow.
#### Examples
       Suppose that given two position vectors, we want to change
       one of the positions until the two vectors are perpendicular.
       The following code fragment demonstrates the use of vdot_c to do so.

           dot = vdot_c ( v1, v2 )

           while ( fabs(dot) > tolerance )
           {
              [ CHANGE ONE OF THE POSITION VECTORS ]

              dot = vdot_c ( v1, v2 )
           }
#### Restrictions
       The user is responsible for determining that the vectors v1 and
       v2 are not so large as to cause numeric overflow.  In most cases
       this won't present a problem.
#### Literature_References
       None.
#### Author_and_Institution
       N.J. Bachman       (JPL)
       W.L. Taber         (JPL)
       W.M. Owen          (JPL)
#### Version
       -CSPICE Version 1.0.2, 16-JAN-2008   (EDW)

          Corrected typos in header titles:

          Detailed Input to Detailed_Input
          Detailed Output to Detailed_Output

       -CSPICE Version 1.0.1, 12-NOV-2006 (EDW)

          Added Parameters section header.

       -CSPICE Version 1.0.0, 16-APR-1999 (EDW)
#### Index_Entries
       dot product 3-dimensional vectors
#### Link to routine vdot_c source file vdot_c.c

    Thu Apr 16 08:59:29 2009