标签:name turn class 半径 rgba ati return bool 坐标
/// <summary> /// 判断点是否在圆内 /// </summary> /// <param name="pointX">点的X坐标</param> /// <param name="pointY">点的Y坐标</param> /// <param name="circleCenterX">圆心X坐标</param> /// <param name="circleCenterY">圆心Y坐标</param> /// <param name="radius">圆的半径</param> /// <returns></returns> public static bool IsPointInCircle(float pointX, float pointY, float circleCenterX, float circleCenterY, float radius) { float x = pointX - circleCenterX; float y = pointY - circleCenterY; return Math.Sqrt(x * x + y * y) <= radius; }
标签:name turn class 半径 rgba ati return bool 坐标
原文地址:https://www.cnblogs.com/yuanshuo/p/14282906.html