UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

13 lines (12 loc) 438 B
"use client"; //#region packages/@mantine/core/src/components/ScrollArea/utils/linear-scale.ts function linearScale(input, output) { return (value) => { if (input[0] === input[1] || output[0] === output[1]) return output[0]; const ratio = (output[1] - output[0]) / (input[1] - input[0]); return output[0] + ratio * (value - input[0]); }; } //#endregion exports.linearScale = linearScale; //# sourceMappingURL=linear-scale.cjs.map