Skip to main content

Function: ensureNonNegativeFinite()

ensureNonNegativeFinite(data): void

Sanitize float buffer in-place: set any negative or non-finite value to 0. Used after loading and before saving/encoding so pipelines can assume non-negative finite data.

Parameters​

data​

Float32Array

Float32Array to mutate

Returns​

void