FGenericPlatformMath::CountLeadingZeros

Counts the number of leading zeros in the bit representation of the 32-bit value

Choose your operating system:

Windows

macOS

Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformMath.h

Include

#include "GenericPlatform/GenericPlatformMath.h"

Syntax

static uint32 CountLeadingZeros
(
    uint32 Value
)

Remarks

Counts the number of leading zeros in the bit representation of the 32-bit value

Returns

the number of zeros before the first "on" bit

Parameters

Parameter

Description

Value

the value to determine the number of leading zeros for