---
title: "distance_squared(_:_:)"
framework: simd
role: symbol
role_heading: Function
path: "simd/distance_squared(_:_:)-73nv3"
---

# distance_squared(_:_:)

Returns the square of the distance between two vectors.

## Declaration

```swift
func distance_squared(_ x: SIMD4<Double>, _ y: SIMD4<Double>) -> Double
```

## See Also

### Length and Distance Functions

- [length(_:)](simd/length(_:)-79i68.md)
- [length_squared(_:)](simd/length_squared(_:)-856uz.md)
- [distance(_:_:)](simd/distance(_:_:)-559m9.md)
