| 48 | |
| 49 | |
| 50 | bool 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 | |
| 66 | bool Correlation::calculate(bool forced) |