# RegionDistance delegate

Namespace: [Grasshopper2.Geometry.SpatialTree](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.geometry.spatialtree.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public delegate RegionDistance
```

Delegate used in custom near searches.

**Signature:**

```cs
void RegionDistance(OrthogonalBox region, out double minDistance, out double maxDistance)
```

**Parameters:**

- `region` ([OrthogonalBox](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.spatialtree.orthogonalbox.md)): Region for distance measurement.
- `minDistance` (out [double](https://learn.microsoft.com/dotnet/api/system.double)): Smallest distance to region.
- `maxDistance` (out [double](https://learn.microsoft.com/dotnet/api/system.double)): Largest distance to region.
