MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / add

Method add

libraries/Correlation/Correlation.cpp:50–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48
49
50bool Correlation::add(float x, float y)
51{
52 if ( (_count < _size) || _runningMode)
53 {
54 _x[_index] = x;
55 _y[_index] = y;
56 _index++;
57 if (_index >= _size) _index = 0;
58 if (_count < _size) _count++;
59 _needRecalculate = true;
60 return true;
61 }
62 return false;
63}
64
65
66bool Correlation::calculate(bool forced)

Callers 1

unittestFunction · 0.45

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.36