UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

16 lines (13 loc) 382 B
'use client'; 'use strict'; 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]); }; } exports.linearScale = linearScale; //# sourceMappingURL=linear-scale.cjs.map