/*-------------- Telecommunications & Signal Processing Lab --------------- McGill University Routine: void VRfScale (double a, const float x[], float y[], int N) Purpose: Multiply each element of a float array by a scalar value Description: This routine multiplies each element of a float array by a scalar value, y[i] = a * x[i], 0 <= i < N. Parameters: -> double a A scalar value -> const float x[] Input array (N elements) <- float y[] Output array (N elements). The output array can be the same as the input array. -> int N Number of elements in the arrays (may be zero). Author / revision: J. Stachurski $Revision: 1.6 $ $Date: 1996/05/06 20:41:54 $ -------------------------------------------------------------------------*/ static char rcsid[] = "$Id: VRfScale.c 1.6 1996/05/06 AFsp-V2R1 $"; #include void VRfScale (a, x, y, N) double a; const float x[]; float y[]; int N; { int i; for (i = 0; i < N; ++i) y[i] = a * x[i]; return; }