void vscl_c ( SpiceDouble s,
ConstSpiceDouble v1[3],
SpiceDouble vout[3] )
Multiply a scalar and a 3-dimensional double precision vector.
None.
VECTOR
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
s I Scalar to multiply a vector.
v1 I Vector to be multiplied.
vout O Product vector, s*v1. vout can overwrite v1.
s This is a double precision scalar used to multiply the
vector v1.
v1 This is a 3-dimensional, double precision vector which is
to be scaled by s.
vout This is a 3-dimensional, double precision vector which
is the scalar multiple of v1. vout = s*v1.
None.
Error free.
None.
vscl_c multiplies each component of v1 by s to form the respective
components of vout. No error checking is performed.
The following table shows the output vout as a function of the
the inputs v1, and s from the subroutine vscl_c.
v1 s vout
-------------------------------------------------------
(1, -2, 0) -1 (-1, 2, 0)
(0, 0, 0) 5 ( 0, 0, 0)
The user is responsible for insuring that no floating point
overflow occurs from multiplying s by any component of v1.
No error recovery or reporting scheme is incorporated in this
subroutine.
None.
W.M. Owen (JPL)
E.D. Wright (JPL)
-CSPICE Version 1.1.0, 22-OCT-1998 (NJB)
Made input vector const.
-CSPICE Version 1.0.0, 08-FEB-1998 (EDW)
3-dimensional vector scaling
Link to routine vscl_c source file vscl_c.c
|