Skip to main content

Function: applyProfile()

applyProfile(points, input): number

Defined in: src/lib/profiles/index.ts:250

Shape an input (0–1) with a profile graph: how far between the setting's min (0) and max (1) it puts it. Without points, the input is used as it is. The result is kept within 0–1.

Parameters​

points​

readonly ProfilePoint[] | undefined

input​

number

Returns​

number

Example​

applyProfile(undefined, 0.3); // 0.3
applyProfile(PROFILE_PRESETS[1].content.points, 0.3); // 0.7 (Overweight: a light touch goes most of the way)