Perform the ‘distance’ formula using floating point math. The distance formula is typically used to find the distance between two points and is:
dist = sqrt( (x1 - x2)^2 + (y1 - y2)^2 )
The math is done internally using floating point math to minimize roundoff. The end result is then rounded to the nearest integer.
Params
x1 | x coordinate of first point |
y1 | y coordinate of first point |
x2 | x coordinate of second point |
y2 | y coordinate of second point |
Returns
The closest integer value after peforming the distance formula.