Calculating the distance between 2 points in c#

后端 未结 4 1780
借酒劲吻你
借酒劲吻你 2020-12-18 04:41

I am trying to sort out a method to calculate the distance between 2 points in c#.

This is the code I have been trying though I fear the answer I get is not correct.

4条回答
  •  天涯浪人
    2020-12-18 05:10

    Distance Formula: Given the two points (x1, y1) and (x2, y2), the distance between these points is given by the formula:

    enter image description here

    use it accordingly

提交回复
热议问题