<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/simd/distance_squared(_:_:)-87jjy",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "simd"
    ],
    "preciseIdentifier" : "s:4simd16distance_squaredySfs5SIMD3VySfG_AEtF"
  },
  "title" : "distance_squared(_:_:)"
}
-->

# distance_squared(_:_:)

Returns the square of the distance between two vectors.

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)