From 9a42f26377706638552be0af67804d2cf33c5671 Mon Sep 17 00:00:00 2001 From: matcane Date: Sat, 19 Sep 2026 14:44:30 +0200 Subject: [PATCH] refactor(utils): use clamp from Reanimated --- src/utils.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/utils.ts b/src/utils.ts index bd87ede..d92d150 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,9 +1,6 @@ -export const EDGE_MARGIN = 8; +import { clamp } from "react-native-reanimated"; -export function clamp(value: number, min: number, max: number) { - "worklet"; - return Math.min(Math.max(value, min), max); -} +export const EDGE_MARGIN = 8; export function clampInitialRatio(value: number) { "worklet";