AlignDown

Aligns a value to the nearest lower multiple of 'Alignment', which must be a power of two.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Templates/AlignmentTemplates.h

Include

#include "Templates/AlignmentTemplates.h"

Syntax

template<typename T>
constexpr T AlignDown
(
    T Val,
    uint64 Alignment
)

Remarks

Aligns a value to the nearest lower multiple of 'Alignment', which must be a power of two.

Returns

The value aligned down to the specified alignment.

Parameters

Parameter

Description

Val

The value to align.

Alignment

The alignment value, must be a power of two.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss