Skip to content

Commit 6d34c66

Browse files
authored
docs(animation): add MAX_SAFE_INTEGER warning for large input edge case (#2589)
1 parent eebfff2 commit 6d34c66

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/guide/extras/animation.md

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

163+
// 注意: Number.MAX_SAFE_INTEGER (9007199254740991) より大きい入力の場合、
164+
// JavaScript の数値精度に制限があるため、結果が不正確になる可能性があります。
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+
// 注意: Number.MAX_SAFE_INTEGER (9007199254740991) より大きい入力の場合、
189+
// JavaScript の数値精度に制限があるため、結果が不正確になる可能性があります。
186190
watch: {
187191
number(n) {
188192
gsap.to(this, { duration: 0.5, tweened: Number(n) || 0 })

0 commit comments

Comments
 (0)