# TypeScript code snippet – How to check if there is any point which lies inside the circle?

public static bool IsWithinCircle(PointF pC, Point pP, Single fRadius){ return Distance(pC, pP) <= fRadius; } public static Single Distance(PointF p1, PointF p2){ Single dX = p1.X - p2.X; Single dY = p1.Y - p2.Y; Single multi = dX * dX + dY * dY; Single dist = (Single)Math.Round((Single)Math.Sqrt(multi), 3); return (Single)dist; }