Select to view content in your preferred language

Question re line length

400
1
05-17-2010 08:18 PM
BrianBorg
Emerging Contributor
I have 2 points (lets say p1 and p2) that are 200.5m apart. How can I modify the points to be 200m exactly away. I just need the algorithm.

bramu
0 Kudos
1 Reply
DominiqueBroux
Esri Frequent Contributor
Something simple like:
double ratio = 200/200.5;     
p2.X = p1.X + ratio * (p2.X-p1.X);
p2.Y = p1.Y + ratio * (p2.Y-p1.Y);
 


or do you need to deal with geodesic precision?
0 Kudos