---
title: "alignedUp(toMultipleOf:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/unsaferawpointer/alignedup(tomultipleof:)"
---

# alignedUp(toMultipleOf:)

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

## Declaration

```swift
func alignedUp(toMultipleOf alignment: Int) -> UnsafeRawPointer
```

## Parameters

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

## Return Value

Return Value A pointer aligned to alignment.

## Discussion

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