GetAdjacentSamples
method in Coherence.Interpolation
Methods
public SampleBuffer<T>.AdjecentSamplesResult GetAdjacentSamples(double time)
Searches the buffer for the two samples adjacent to the given time. Returns (default, default, -1) if the buffer is empty. Returns (sample[0], sample[0], 0) if the buffer contains less than two samples - or if time pre-dates the first sample. Otherwise, it returns the sample before (or equal to) the given time, and the next sample in the buffer. IsLastSample is true if the second returned sample is the last sample in the buffer.
Parameters
Type | Name | Description |
---|---|---|
double | time | The time used to compare with sample times in the buffer. |
Returns
Type | Description |
---|---|
SampleBuffer<T>.AdjecentSamplesResult |