View Single Post
Old 08-06-2008, 01:12 PM   #2 (permalink)
mordero
Forum Expert
 
mordero's Avatar
 
Join Date: Nov 2003
Location: Illinois, USA
Age: 22
Posts: 2,911
Default

Almost, but not quite. Its:

Code:
    public static int CalculateDistance( Mobile from, Mobile target )
    {
        int distance = Math.Sqrt( Math.Pow( from.X - target.X, 2 ) + Math.Pow( from.Y - target.Y, 2 ) );
        return distance;
    }
mordero is offline   Reply With Quote