RPE Chart Utils
    Preparing search index...

    Function easing

    • Evaluate an RPE easing at progress x.

      Handles sub-range clamping (easingLeft/easingRight) and optional cubic-bezier override. This is the main function you call to get an eased progress value from an RPE event.

      Parameters

      • type: number

        RPE easing type (1–28). Invalid types default to linear (1).

      • x: number

        Raw progress ∈ [0, 1].

      • easingLeft: number = 0

        Left sub-range boundary (default 0). Use with easingRight to restrict the easing to a portion of the curve.

      • easingRight: number = 1

        Right sub-range boundary (default 1).

      • OptionalbezierPoints: number[]

        If provided (4 numbers [x1, y1, x2, y2]), uses a CSS-style cubic bezier instead of the type curve.

      Returns number

      The eased progress value, usually ∈ [0, 1].

      easing(8, 0.5);              // CubicOut at 50% → ~0.875
      easing(1, 0.5, 0.25, 0.75); // Linear, sub-range [0.25, 0.75]
      easing(1, 0.5, 0, 1, [0.4, 0, 0.2, 1]); // Custom bezier