nn::math::IsPwr2 Function

Syntax

bool IsPwr2(
     int x
);

Parameters

Name Description
in x Integer value to evaluate.

Return Values

Returns true if x is a power of two and false otherwise.

Description

Determines whether an integer is a power of two.

Revision History

2010/01/07
Initial version.

CONFIDENTIAL