You are currently viewing the gmlscripts.pro static mirror. Forum access and script submissions are not available through this mirror.

Invert gmlscripts.pro

bit_clear

bits = 229;                //  bits == 229 (11100101)
bits = bit_clear(bits,5);  //  bits == 197 (11000101)
bit_clear(bitfield,bit)
Returns a given bitfield with a given bit set to 0.
COPY/// bit_clear(bitfield,bit)
//
//  Returns a given bitfield with a given bit set to 0.
//
//      bitfield    number or group of bits, integer
//      bit         bit index to change, integer
//
/// gmlscripts.pro/license
{
    return argument0 & ~(1 << argument1);
}

Contributors: xot

GitHub: View · Commits · Blame · Raw