public static bool Contains(this BBox bbox, IPoint point) { if (point.X >= bbox.XMin && point.X <= bbox.XMax && point.Y >= bbox.YMin && point.Y <= bbox.YMax) { return(true); } else { return(false); } }
public static bool Within(this IPoint point, BBox bbox) { if (point.X >= bbox.XMin && point.X <= bbox.XMax && point.Y >= bbox.YMin && point.Y <= bbox.YMax) { return(true); } else { return(false); } }