CSharp examples for System:Math Geometry
Calculate Distance 2D
using System;/* w ww. j a v a2 s .c om*/ public class Main{ public static double CalcDistance2D(double x1, double y1, double x2, double y2) { double deltaX = x1 - x2; double deltaY = y1 - y2; double distance = Math.Sqrt((deltaX * deltaX) + (deltaY * deltaY)); return distance; } }