Skip to content

HistoryCache

Ilia Petrov-Komotskii edited this page Sep 30, 2026 · 2 revisions

Vector2HistoryCache and Vector3HistoryCache extend HistoryCache<T> from ManeTools-dotNET. GetAverage() is the vector mean. Empty → zero. Overlapping Append, Clear, and GetAverage calls on one cache are serialized by the base class.

Vector3HistoryCache trail = new(30);
trail.Append(transform.position);
Vector3 smooth = trail.GetAverage();

Clone this wiki locally