void vadd_c ( ConstSpiceDouble v1[3],
ConstSpiceDouble v2[3],
SpiceDouble vout[3] )
Add two 3 dimensional vectors.
None.
VECTOR
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
v1 I First vector to be added.
v2 I Second vector to be added.
vout O Sum vector, v1 + v2.
vout can overwrite either v1 or v2.
v1 This may be any 3-element vector.
v2 Likewise.
vout This is vector sum of v1 and v2. vout may overwrite either
v1 or v2.
None.
Error free.
None.
This routine simply performs addition between components of v1
and v2. No checking is performed to determine whether floating
point overflow has occurred.
The following table shows the output vout as a function of the
the input v1 and v2 from the subroutine vadd_c.
v1 v2 ---> vout
-------------- -------------- --------------
(1.0, 2.0, 3.0) (4.0, 5.0, 6.0) (5.0, 7.0, 9.0)
(1D-7,1D23,0) (1D24, 1D23, 0.0) (1D24,2D23,0.0)
The user is required to determine that the magnitude each
component of the vectors is within the appropriate range so as
not to cause floating point overflow.
None.
W.M. Owen (JPL)
E.D. Wright (JPL)
-CSPICE Version 1.1.0, 22-OCT-1998 (NJB)
Made input vectors const.
-CSPICE Version 1.0.0, 08-FEB-1998 (EDW)
3-dimensional vector addition
Link to routine vadd_c source file vadd_c.c
|