<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/simd/vector4-8b00f",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "simd"
    ],
    "preciseIdentifier" : "c:@F@vector4#]3f#f#"
  },
  "title" : "vector4"
}
-->

# vector4

Returns a new vector from a vector and a scalar value.

```
static simd_float4 vector4(simd_float3 __xyz, float __w);
```

---

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)