INNER CODE UNIT · TypeScript
res
terrysahaidak/react-native-gallery-toolkit · packages/common/src/common.ts:29
const res = Math.max(
1,
Math.min(
MAX_FRICTION,
1 + (Math.abs(value) * (MAX_FRICTION - 1)) / MAX_VALUE,
),
);
if (value < 0) {
return -res;
}
return res;
}
// in order to simultaneousHandlers to work
// we need to trigger rerender of the screen
// so refs will be valid then