我有以下内容:
bool AreNear(Point Old, Point Current)
{
int x1 = Convert.ToInt32(Old.X);
int x2 = Convert.ToInt32(Current.X);
int y1 = Convert.ToInt32(Old.Y);
int y2 = Convert.ToInt32(Current.Y);
if (x1 == x2) {
if (y1 == y2) {
return true;
}
}
return false;
}
Run Code Online (Sandbox Code Playgroud)
如果当前点位于旧点的25像素半径内,我想在函数中返回true.谁能告诉我怎么做?