Skip to content

Commit be5a7d1

Browse files
authored
docs(animation): add note about Number.MAX_SAFE_INTEGER for large input edge case
1 parent cfeabfb commit be5a7d1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/guide/extras/animation.md

+4
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ const tweened = reactive({
160160
number: 0
161161
})
162162

163+
// Note: For inputs greater than Number.MAX_SAFE_INTEGER (9007199254740991),
164+
// the result may be inaccurate due to limitations in JavaScript number precision.
163165
watch(number, (n) => {
164166
gsap.to(tweened, { duration: 0.5, number: Number(n) || 0 })
165167
})
@@ -183,6 +185,8 @@ export default {
183185
tweened: 0
184186
}
185187
},
188+
// Note: For inputs greater than Number.MAX_SAFE_INTEGER (9007199254740991),
189+
// the result may be inaccurate due to limitations in JavaScript number precision.
186190
watch: {
187191
number(n) {
188192
gsap.to(this, { duration: 0.5, tweened: Number(n) || 0 })

0 commit comments

Comments
 (0)