Determine the distance between point (x1, y1) and point (x2, y2), and assign the result to pointsdistance. the calculation is: d
istance=(x2−x1)2+(y2−y1)2‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾√distance=(x2−x1)2+(y2−y1)2 you may declare additional variables. ex: for points (1.0, 2.0) and (1.0, 5.0), pointsdistance is 3.0.
For this case what you should know is that the distance between two points can be thought of as a line. To find the length of this line, you can use the formula: d: √ [(x2 - x1) ^ 2 + (y2 - y1) ^ 2] Example, for points (1.0, 2.0) and (1.0, 5.0): d: √ [(1 - 1) ^ 2 + (5 - 2) ^ 2] d: 3.0 Answer: the distance between point (x1, y1) and point (x2, y2) is: d: √ [(x2 - x1) ^ 2 + (y2 - y1) ^ 2]