using System;
namespace ComputationalGeometry.Shapes
{
public static class MathUtility
{
///
/// Calculates the distance between two points.
///
/// First point.
/// Second point.
/// The distance between two points.
public static double GetDistance(Point2D p1, Point2D p2)
{
double xDelta = p1.X - p2.X;
double yDelta = p1.Y - p2.Y;
return Math.Sqrt(Math.Pow(xDelta, 2) + Math.Pow(yDelta, 2));
}
}
}