FloorPwr2

nn::math::FloorPwr2 Function

Syntax

u32 FloorPwr2(
     u32 x
);

Arguments

Name Description
in x Integer value.

Return Values

Returns the highest power of two that is less than or equal to x.

Description

Calculates the highest power of two that is less than or equal to the integer provided.

This function uses the standard floorf function.

Revision History

2011/08/26
Added text about internal implementation.
2010/01/07
Initial version.

CONFIDENTIAL