Wednesday, 22 January 2014

Calculate Distance between two points

   float x1,x2,y1,y2,d;
    x1=9,y1=7;
    x2=3,y2=2;
    float a=x1-x2,b=y1-y2;
    d=sqrt(powf(a,2)+powf(b,2));

    NSLog(@"%f",d);

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. I feel really happy to have seen your webpage and look forward to so many more entertaining times reading here. Thanks once more for all the details. Unites States city distances

    ReplyDelete