---
title: "vectorWithX:Y:"
framework: coreimage
role: symbol
role_heading: Type Method
path: "coreimage/civector/vectorwithx:y:"
---

# vectorWithX:Y:

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

## Declaration

```occ
+ (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

Return Value  An autoreleased CIVector object of length 2.

## See Also

### Creating a Vector

- [vectorWithValues:count:](coreimage/civector/vectorwithvalues:count:.md)
- [vectorWithX:](coreimage/civector/vectorwithx:.md)
- [vectorWithX:Y:Z:](coreimage/civector/vectorwithx:y:z:.md)
- [vectorWithX:Y:Z:W:](coreimage/civector/vectorwithx:y:z:w:.md)
- [vectorWithString:](coreimage/civector/vectorwithstring:.md)
- [init(cgAffineTransform:)](coreimage/civector/init(cgaffinetransform:)-59e4k.md)
- [init(cgPoint:)](coreimage/civector/init(cgpoint:)-3mobm.md)
- [init(cgRect:)](coreimage/civector/init(cgrect:)-3undj.md)
