MATH_CountPopulation

C Specification

#include <nitro/math.h>
u8 MATH_CountPopulation( u32 x );

  

Arguments

x The value to scan

Return Values

The number of 1 bits.

Description

This function scans the data of a 32-bit quantity and determines the number of bits that are set to 1. 0xf0f0f0f0 and 0x55555555 are both 16.

See Also

MATH_CountLeadingZeros

Revision History

12/14/2004 Initial version.