MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Average

Method Average

Source/Engine/Core/Collections/SamplesBuffer.h:179–188  ·  view source on GitHub ↗

Gets the average value in the buffer.

Source from the content-addressed store, hash-verified

177 /// Gets the average value in the buffer.
178 /// </summary>
179 T Average() const
180 {
181 ASSERT(HasItems());
182 T result = _data[0];
183 for (int32 i = 1; i < _count; i++)
184 {
185 result += _data[i];
186 }
187 return result / _count;
188 }
189};

Callers 2

RenderInnerMethod · 0.80
OnTickBeginMethod · 0.80

Calls 1

HasItemsFunction · 0.85

Tested by

no test coverage detected