> For the complete documentation index, see [llms.txt](https://wcandillon.gitbook.io/redash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wcandillon.gitbook.io/redash/physics.md).

# Physics

## `snapPoint()`

```typescript
const snapPoint = (value: number, velocity: number, points: ReadonlyArray<number>): number;
```

Select a point where the animation should snap to given the value of the gesture and it's velocity.

```typescript
withSpring(snapPoint(translationX, velocityX, [0, width]))
```
