RPE Chart Utils
    Preparing search index...

    Function mirrorEventValues

    • Mirror event values around a center value (mutates in place).

      For moveX events, use center = 0 to flip horizontal motion. For moveY / rotation events, also use center = 0.

      Parameters

      • events: (Event | SpeedEvent)[]

        Array of numeric events to mirror.

      • center: number = 0

        The pivot value to mirror around (default 0).

      Returns void

      // Flip all horizontal movement
      mirrorEventValues(layer.moveXEvents ?? []);

      // Mirror rotation around 45°
      mirrorEventValues(layer.rotateEvents ?? [], 45);