Utilities

👆 @use-gesture uses a set of utility functions internally that are exposed for anybody's convenience. Well only one actually.

rubberbandIfOutOfBounds

Calculates the rubberbanding effect from a given position value, two bounds min, max and an elasticity constant.

function rubberbandIfOutOfBounds(position: number, min: number, max: number, constant = 0.15): number