<!--
{
  "availability" : [
    "macOS: 10.10.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/AffineTransform/translate(x:y:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation15AffineTransformV9translate1x1yy04CoreA07CGFloatV_AItF"
  },
  "title" : "translate(x:y:)"
}
-->

# translate(x:y:)

Mutates an affine transformation matrix to perform the specified translation.

```
mutating func translate(x: CGFloat, y: CGFloat)
```

## Parameters

`x`

The horizontal translation value.

`y`

The vertical translation value.

---

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)