Hello everybody,
I had to calculate the distance between two points, so I wrote this function :
static float distpoints(int x1, int y1, int x2, int y2)
{
return (float)Math.Sqrt(((float)Math.Pow(x1 + x2, 2)) + ((float)Math.Pow(y1 + y2, 2)));
}
I called that with parameters 400, 150, 400, 150, and it answered me about 854.
Well, I awaited 0, no ?