Reverses the drection of an array of doubles. I.e. the first element (0) is replaced by the last (len - 1), element 1 is replaced by element (len - 1 - 1), etc.
| 41 | // I.e. the first element (0) is replaced by the last (len - 1), |
| 42 | // element 1 is replaced by element (len - 1 - 1), etc. |
| 43 | inline void reverse_array (double data[], int len) |
| 44 | { |
| 45 | for (int i = 0; i < len / 2; i++) |
| 46 | { |
| 47 | double temp = data[i]; |
| 48 | data[i] = data[len - i - 1]; |
| 49 | data[len - i - 1] = temp; |
| 50 | } |
| 51 | } |
no outgoing calls
no test coverage detected