<!--
{
  "availability" : [
    "iOS: 5.0.0 -",
    "iPadOS: 5.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIVector/vectorWithX:Y:",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Core Image"
    ],
    "preciseIdentifier" : "c:objc(cs)CIVector(cm)vectorWithX:Y:"
  },
  "title" : "vectorWithX:Y:"
}
-->

# vectorWithX:Y:

Create a Core Image vector object that is initialized with two values.

```
+ (instancetype) vectorWithX:(CGFloat) x Y:(CGFloat) y;
```

## Parameters

`x`

The value for the first position in the vector.

`y`

The value for the second position in the vector.

## Return Value


An autoreleased [`CIVector`](/documentation/CoreImage/CIVector) object of length 2.

---

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)