Euclidian Distance - CSharp System

CSharp examples for System:Math Geometry

Description

Euclidian Distance

Demo Code


using System.Threading.Tasks;
using System.Text;
using System.Linq;
using System.Collections.Generic;
using System;/*w ww  .j a  va2 s .c o  m*/

public class Main{
        public static double EuclidianDistance(double one, double two, double max)
        {
            return 1 - (Math.Abs(one - two)) / max;
        }
}

Related Tutorials