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

Invert GMLscripts.com

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.com/license
{
    return argument0 & ~(1 << argument1);
}

Contributors: xot

GitHub: View · Commits · Blame · Raw