public static bool TestMovingSpherePlane(Vector3 a, Vector3 b, float r, Plane p) { var num = Vector3.Dot(a, p.Normal) - p.D; var num2 = Vector3.Dot(b, p.Normal) - p.D; return (((num * num2) < 0f) || ((Math.Abs(num) <= r) || (Math.Abs(num2) <= r))); }