<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGVectorMake(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Graphics"
    ],
    "preciseIdentifier" : "c:@F@CGVectorMake"
  },
  "title" : "CGVectorMake(_:_:)"
}
-->

# CGVectorMake(_:_:)

Returns a vector with the specified dimension values.

```
func CGVectorMake(_ dx: CGFloat, _ dy: CGFloat) -> CGVector
```

## Parameters

`dx`

The x-coordinate of the vector to construct.

`dy`

The y-coordinate of the vector to construct.

## Return Value

Returns a <doc://com.apple.documentation/documentation/CoreFoundation/CGVector> structure with the specified coordinates.

## Discussion

---

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)