---
title: "distance(_:_:)"
framework: simd
role: symbol
role_heading: Function
path: "simd/distance(_:_:)-39uat"
---

# distance(_:_:)

Returns the distance between two vectors.

## Declaration

```swift
func distance(_ x: SIMD4<Float>, _ y: SIMD4<Float>) -> Float
```

## See Also

### Length and Distance Functions

- [length(_:)](simd/length(_:)-9i1zg.md)
- [length_squared(_:)](simd/length_squared(_:)-80gxf.md)
- [distance_squared(_:_:)](simd/distance_squared(_:_:)-32wfg.md)
