@remotion/media-utils
Version:
Utilities for working with media files
10 lines (9 loc) • 338 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizeData = void 0;
const normalizeData = (filteredData) => {
const max = Math.max(...filteredData);
const multiplier = max === 0 ? 0 : max ** -1;
return filteredData.map((n) => n * multiplier);
};
exports.normalizeData = normalizeData;