1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
//
// GENERATED FILE
//
use super::*;
use crate::SpiceContext;
use f2rust_std::*;
/// Vector scaling, 3 dimensions, in place
///
/// Multiply a scalar and a 3-dimensional double precision vector,
/// replacing the input vector with the result.
///
/// # Brief I/O
///
/// ```text
/// VARIABLE I/O DESCRIPTION
/// -------- --- --------------------------------------------------
/// S I Scalar by which to multiply a vector.
/// V I-O Vector to be multiplied/result of multiplication.
/// ```
///
/// # Detailed Input
///
/// ```text
/// S is a double precision scalar used to multiply the vector
/// V.
///
/// V is a 3-dimensional, double precision vector which is to
/// be scaled by S.
/// ```
///
/// # Detailed Output
///
/// ```text
/// V is the 3-dimensional, double precision vector resulting
/// from the scalar multiplication
///
/// S * V
/// ```
///
/// # Exceptions
///
/// ```text
/// Error free.
/// ```
///
/// # Particulars
///
/// ```text
/// This routine is provided for situation where it is convenient to
/// scale a vector in place rather than store the result in a
/// separate variable. Note that the call
///
/// CALL VSCL ( S, V, V )
///
/// is not permitted by the ANSI Fortran 77 standard; this routine
/// can be called instead to achieve the same result.
///
/// VSCLIP multiplies each component of V by S to form the respective
/// components of the output vector. No error checking is performed.
/// ```
///
/// # Examples
///
/// ```text
/// The following table shows the output V as a function of the
/// the inputs V and S.
///
/// V on input S V on output
/// -------------------------------------------------------
/// (1D0, -2D0, 0D0) -1D0 (-1D0, 2D0, 0D0)
/// (0D0, 0D0, 0D0) 5D0 (0D0, 0D0, 0D0)
/// ```
///
/// # Restrictions
///
/// ```text
/// 1) The user is responsible for insuring that no floating point
/// overflow occurs from multiplying S by any component of V. No
/// error recovery or reporting scheme is incorporated in this
/// subroutine.
/// ```
///
/// # Author and Institution
///
/// ```text
/// N.J. Bachman (JPL)
/// J. Diaz del Rio (ODC Space)
/// W.M. Owen (JPL)
/// ```
///
/// # Version
///
/// ```text
/// - SPICELIB Version 1.1.0, 16-AUG-2021 (JDR)
///
/// Added IMPLICIT NONE statement.
///
/// Edited the header to comply with NAIF standard.
///
/// - SPICELIB Version 1.0.0, 01-SEP-2005 (NJB) (WMO)
/// ```
pub fn vsclip(s: f64, v: &mut [f64; 3]) {
VSCLIP(s, v);
}
//$Procedure VSCLIP ( Vector scaling, 3 dimensions, in place )
pub fn VSCLIP(S: f64, V: &mut [f64]) {
let mut V = DummyArrayMut::new(V, 1..=3);
V[1] = (S * V[1]);
V[2] = (S * V[2]);
V[3] = (S * V[3]);
}