import { RAD2DEG } from '../../utils/index.mjs';
import unpack from '../../utils/unpack.mjs';

const { sqrt: sqrt$4, atan2: atan2$2, round: round$4 } = Math;

const lab2lch = (...args) => {
    const [l, a, b] = unpack(args, 'lab');
    const c = sqrt$4(a * a + b * b);
    let h = (atan2$2(b, a) * RAD2DEG + 360) % 360;
    if (round$4(c * 10000) === 0) h = Number.NaN;
    return [l, c, h];
};

export { lab2lch as default };
//# sourceMappingURL=lab2lch.mjs.map
