/// <summary> /// returns the distance to the closest edge point of the multi kick rectangle /// </summary> /// <returns></returns> float GetEdgeValue(Geometry.Polygon.Rectangle multiKickRect, Vector2 position) { return(multiKickRect.GetDetailedPolygon().Points.OrderBy(x => x.Distance(position)).First().Distance(position)); }