---
title: CGVector
framework: corefoundation
role: symbol
role_heading: Structure
path: corefoundation/cgvector
---

# CGVector

A structure that contains a two-dimensional vector.

## Declaration

```swift
struct CGVector
```

## Topics

### Special Values

- [zero](corefoundation/cgvector/zero.md)
- [init()](corefoundation/cgvector/init().md)

### Geometric Properties

- [dx](corefoundation/cgvector/dx.md)
- [dy](corefoundation/cgvector/dy.md)

### Initializers

- [init(dx:dy:)](corefoundation/cgvector/init(dx:dy:)-1cr8k.md)
- [init(dx:dy:)](corefoundation/cgvector/init(dx:dy:)-57w7m.md)
- [init(dx:dy:)](corefoundation/cgvector/init(dx:dy:)-5dw92.md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Structures

- [CGAffineTransform](corefoundation/cgaffinetransform.md)
- [CGAffineTransformComponents](corefoundation/cgaffinetransformcomponents.md)
- [CGFloat](corefoundation/cgfloat-swift.struct.md)
- [CGPoint](corefoundation/cgpoint.md)
- [CGRect](corefoundation/cgrect.md)
- [CGSize](corefoundation/cgsize.md)
