View Single Post
  #3 (permalink)  
Old 05-04-2008, 01:43 AM
mholt mholt is offline
Newbie
 
Join Date: Jan 2008
Posts: 27
Credits: 0
Rep Power: 4
mholt is on a distinguished road
Default Re: Calculating Line Length

Programmatically:


Code:
#include <math.h>
// point A(x1, y1)
// point B(x2, y2)

double distance = sqrt((x2-x1)^2 + (y2-y1)^2);
This works for any point anywhere on the X-Y coordinate plane.

Last edited by mholt; 05-04-2008 at 01:48 AM.
Reply With Quote