Function mask2 [src]

Returns index modulo twice the length of the backing slice.

Prototype

pub fn mask2(self: RingBuffer, index: usize) usize

Parameters

self: RingBufferindex: usize

Source

pub fn mask2(self: RingBuffer, index: usize) usize { return index % (2 * self.data.len); }