MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / reverse_array

Function reverse_array

src/data_handler/inc/common_data_handler_helpers.h:43–51  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

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.
43inline 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}

Callers 4

perform_lowpassFunction · 0.85
perform_highpassFunction · 0.85
perform_bandpassFunction · 0.85
perform_bandstopFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected