Delta - MDN Web Docs Glossary: Definitions of Web-related terms 编辑

The term delta refers to the difference between two values or states. The name originates from the Greek letter Δ (delta), which is equivalent to the letter D in the Roman alphabet. Delta refers to the use of the letter Δ as a shorthand for difference.

The term delta is commonly used when communicating changes in speed, position, or acceleration of a physical or virtual object. It's also used when describing changes in the volume or frequency of sound waves.

For example, when describing how far an object on the screen moves left-to-right, one might use the term delta x or Δx.

Likewise, given the new value of X and its old value, you might compute the delta like this:

let deltaX = newX - oldX;

More commonly, you receive the delta and use it to update a saved previous condition:

let newX = oldX + deltaX;

Learn more

Technical reference

  • Mouse wheel events (WheelEvent offer the amount the wheel moved since the last event in its deltaXdeltaY, and deltaZ properties, for example.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:113 次

字数:1714

最后编辑:8年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文