### Formula

s

displacement

x1

x coordinate of initial position

y1

y coordinate of initial position

x2

x coordinate of final position

y2

y coordinate of final position

s

displacement

x1

x coordinate of initial position

y1

y coordinate of initial position

x2

x coordinate of final position

y2

y coordinate of final position

A displacement is the shortest distance from the initial to the final position of a point P. Thus, it is the length of an imaginary straight path, typically distinct from the path actually traveled by P.

x1

y1

x2

y2

s

Precision

- C
- C#
- C++
- Java
- JavaScript
- LaTeX
- PHP