void vminug_c ( ConstSpiceDouble * vin,
SpiceInt ndim,
SpiceDouble * vout )
Negate a double precision vector of arbitrary dimension.
None.
VECTOR
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
vin I ndim-dimensional double precision vector to
be negated.
ndim I Dimension of vin (and also vout).
vout O ndim-dimensional double precision vector equal to
-vin.
vin double precision vector of arbitrary size.
ndim the dimension of vin and vout.
vout a double precision vector which contains the negation
of vin. vout may overwrite vin.
None.
Error free.
None.
For each value of the index i from 1 to ndim, vminug_c negates vin
by the expression:
vout[i] = - vin[i];
Let vin = [ -10.0, 15.0, -5.0, 20.0 ]
The call
vminug_c ( vin, 4, vin )
negates all of the components of the vector VIN, and overwrites
the original components. The vector VIN then contains the
components
vin = [ 10.0, -15.0, 5.0, -20.0 ]
None.
None.
W.M. Owen (JPL)
E.D. Wright (JPL)
-CSPICE Version 1.0.0, 29-JUN-1999
negate an n-dimensional vector
Link to routine vminug_c source file vminug_c.c
|