/// <summary> /// Computes the squared distance from this <see cref="BoundingRectangle"/> to a <see cref="Point2"/>. /// </summary> /// <param name="point">The point.</param> /// <returns>The squared distance from this <see cref="BoundingRectangle"/> to the <paramref name="point"/>.</returns> public float SquaredDistanceTo(Point2 point) { return(PrimitivesHelper.SquaredDistanceToPointFromRectangle(Center - HalfExtents, Center + HalfExtents, point)); }
/// <summary> /// Computes the squared distance from this <see cref="RectangleF"/> to a <see cref="Point2"/>. /// </summary> /// <param name="point">The point.</param> /// <returns>The squared distance from this <see cref="RectangleF"/> to the <paramref name="point"/>.</returns> public float SquaredDistanceTo(Point2 point) { return(PrimitivesHelper.SquaredDistanceToPointFromRectangle(TopLeft, BottomRight, point)); }