---
title: "distance(to:)"
framework: vision
role: symbol
role_heading: Instance Method
path: "vision/joint/distance(to:)"
---

# distance(to:)

Returns the distance to another joint.

## Declaration

```swift
func distance(to joint: Joint) -> CGFloat
```

## Parameters

- `joint`: The joint for which to calculate the distance.

## Return Value

Return Value The calculated distance.
