Function

calculatePan

Returns the change in the centroid location between the previous and the current pointers that are down.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

calculatePan

Common
fun PointerEvent.calculatePan(): Offset

Returns the change in the centroid location between the previous and the current pointers that are down. Pointers that are newly down or raised are not considered in the centroid movement.

Example Usage: