Contents

alignedDown(toMultipleOf:)

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

Declaration

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.