-
Notifications
You must be signed in to change notification settings - Fork 0
signal.Resampling.Function.resampleNearestNeighbor
Christian d'Heureuse edited this page Jun 7, 2026
·
2 revisions
dsp-collection / signal/Resampling / resampleNearestNeighbor
function resampleNearestNeighbor(
ia,
oa,
preserveScale?,
extraValues?): void;Defined in: signal/Resampling.ts:58
Optimized one-dimensional resampling using nearest-neighbor interpolation.
ArrayLike<number>
Input array.
MutableArrayLike<number>
output array.
boolean = false
false: inputPosition = (outputPosition + 0.5) / oa.length * ia.length - 0.5. The array is processed symetrically (except for the entries which are exactly in the middle between two neighbors). true: inputPosition = outputPosition / oa.length * ia.length.
number = 0
Value for the extra array entries at the end, when upsampling with preserveScale = true.
void