← TechnologyThe essentials of

Math.hypot(): distance from perpendicular components

Publisher: ResumeMaker • 1 source

Published: 22 Oct 2026 13:13 · Updated: 22 Oct 2026 13:13

AI source check: 21 Oct 2026 12:40. This is not editorial approval.

In a few sentences

In brief

The function calculates the root of the sum of the squares.

Useful to know

Math.hypot() returns the square root of the sum of the squares of the arguments. For example, Math.hypot(3, 4) is 5. In conditional perpendicular displacements from 3 m and 4 m, the straight-line distance is 5 m. [1]

The example allows the Euclidean plane and the same units. It is not a formula for kilometers of latitudes and longitudes in degrees. Before use, specify what the coordinates are. The convenient function cannot fix the mixing of pixels, meters or different coordinate systems.

Sources

For further detail and to check the information:

  1. [1] MDN — Math.hypot ↗