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

# distance_squared(_:_:)

Returns the square of the distance between two vectors.

## Declaration

```swift
func distance_squared(_ x: SIMD3<Float>, _ y: SIMD3<Float>) -> Float
```

## See Also

### Length and Distance Functions

- [length(_:)](simd/length(_:)-6t47g.md)
- [length_squared(_:)](simd/length_squared(_:)-8odp0.md)
- [distance(_:_:)](simd/distance(_:_:)-8t6ut.md)
