🎥 Make videos programmatically with React
docs: clamp both sides in interpolate() range example
Aditya Pratapd0b0bc773b28
diff --git a/packages/docs/docs/interpolate.mdx b/packages/docs/docs/interpolate.mdxindex 8d77cc2269..25e00e299f 100644--- a/packages/docs/docs/interpolate.mdx+++ b/packages/docs/docs/interpolate.mdx@@ -98,13 +98,14 @@ const scale = interpolate(frame, [0, 20], [0, 1]);```This works, but after 20 frames, the value keeps growing. For example, at frame 40, the scale will be `2`.-To prevent this, this we can use the `extrapolateLeft` and `extrapolateRight` options and set them to `'clamp'` to prevent the result going outside the output range.+To prevent this, we can use the `extrapolateLeft` and `extrapolateRight` options and set them to `'clamp'` to prevent the result going outside the output range.```tsx twoslashimport {interpolate, useCurrentFrame} from 'remotion';const frame = useCurrentFrame();// ---cut---const scale = interpolate(frame, [0, 20], [0, 1], {+ extrapolateLeft: 'clamp',extrapolateRight: 'clamp',});```