Skip to main content
cngx-src documentation

createRingBuffer

Functioncommon/chart/buffer

projects/common/chart/buffer/ring-buffer.ts

Description#

Construct a RingBuffer with a fixed capacity. The backing array is allocated once; no growth, no per-push allocation.

Signature#

createRingBuffer(capacity: number)

Parameters#

@paramcapacitynumber

positive integer maximum element count.

Returns#

RingBuffer