<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/UnsafeMutableRawPointer/alignedDown(toMultipleOf:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:Sv11alignedDown12toMultipleOfSvSi_tF"
  },
  "title" : "alignedDown(toMultipleOf:)"
}
-->

# alignedDown(toMultipleOf:)

Obtain the preceding pointer whose bit pattern is a multiple of
`alignment`.

```
func alignedDown(toMultipleOf alignment: Int) -> UnsafeMutableRawPointer
```

## Parameters

`alignment`

the alignment of the returned pointer, in bytes.
`alignment` must be a whole power of 2.

## Return Value

a pointer aligned to `alignment`.

## Discussion

If the bit pattern of `self` is a multiple of `alignment`,
this function returns `self`.

---

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)