MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ centroid() [1/5]

glm::vec2 MayaFlux::Kinesis::centroid ( const Memory::HistoryBuffer< glm::vec2 > &  history,
size_t  window 
)
inlinenoexcept

Mean position across a window.

Parameters
historyBuffer of positions, capacity >= window
windowNumber of samples, minimum 1
Returns
Centroid of history[0..window-1]

Definition at line 523 of file Differential.hpp.

524{
525 return moving_average(history, window);
526}
T moving_average(const Memory::HistoryBuffer< T > &history, size_t window) noexcept
Simple moving average over the newest window samples.

References moving_average().

Referenced by centroid(), and spread_radius().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: