AMX Mod X API Documentation

Signature
stock xs_is_2power(x){ return(x!=0) && ((x&(x-1))==0);}
Description

Checks if the number is a power of 2.

Parameters
  • x Number to check.
Returns

1 if it is a power of 2, 0 otherwise.

Назад
Верх