Invert GMLscripts.com

bit_toggle

bits = 229;                 //  bits == 229 (11100101)
bits = bit_toggle(bits,5);  //  bits == 197 (11000101)
bit_toggle(bitfield,bit)
Returns a given bitfield with a given bit toggled.
COPY/// bit_toggle(bitfield,bit)
//
//  Returns a given bitfield with a given bit toggled.
//
//      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