diff --git a/README.md b/README.md index 57c9150a..13dfd525 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ const [scope] = reactive().let("x", 0).join(); requestAnimationFrame(animate); function animate() { - scope.x = Math.sin(Date.now() / 1000) * 200; + scope.x = Math.abs(Math.sin(Date.now() / 1000)) * 200; requestAnimationFrame(animate); } diff --git a/docs/what-is-charming.md b/docs/what-is-charming.md index 3e212a07..f80960fc 100644 --- a/docs/what-is-charming.md +++ b/docs/what-is-charming.md @@ -8,7 +8,7 @@ const [scope] = reactive().let("x", 0).join(); requestAnimationFrame(animate); function animate() { - scope.x = Math.sin(Date.now() / 1000) * 200; + scope.x = Math.abs(Math.sin(Date.now() / 1000) * 200); requestAnimationFrame(animate); }