AddMaterials.View.Controls.FillPatternViewerControlWpf.GetDistance C# (CSharp) Method

GetDistance() private method

private GetDistance ( PointF point1, PointF point2 ) : double
point1 System.Drawing.PointF
point2 System.Drawing.PointF
return double
        private double GetDistance( PointF point1, PointF point2 )
        {
            // Pythagorean theorem c^2 = a^2 + b^2
              // thus c = square root(a^2 + b^2)

              double a = (double) ( point2.X - point1.X );
              double b = (double) ( point2.Y - point1.Y );

              return Math.Sqrt( a * a + b * b );
        }