---
title: "distance(_:_:)"
framework: vision
role: symbol
role_heading: Type Method
path: "vision/vnpoint/distance(_:_:)"
---

# distance(_:_:)

Calculates the distance between two points.

## Declaration

```swift
class func distance(_ point1: VNPoint, _ point2: VNPoint) -> Double
```

## Parameters

- `point1`: The first point.
- `point2`: The second point.

## Return Value

Return Value The calculated distance.

## See Also

### Calculating Distance

- [distance(_:)](vision/vnpoint/distance(_:).md)
