Your expression is equivalent to C++ statement:
double d = sqrt ((( x1 - x2)*( x1 - x2)) + ((y1 - y2)*(y1 - y2)));
You must include
<math.h>
, because the function
sqrt
is used.
Tip: Always use brackets properly in your statements. Most often, not using brackets properly causes undefined behavior.