Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
feat: added precision to delta
Browse files Browse the repository at this point in the history
  • Loading branch information
tmgulland committed Jun 7, 2024
1 parent 752ea92 commit 5ba8d22
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pointer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ export const createPointer = ({

const current = state.get()

const delta = current.active
? vector2(point.x - current.point.x, point.y - current.point.y)
: vector2()
const delta = preciseEnough(
current.active ? vector2(point.x - current.point.x, point.y - current.point.y) : vector2()
)

const hasDelta = delta.x !== 0 || delta.y !== 0

Expand Down

0 comments on commit 5ba8d22

Please sign in to comment.