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

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

Contributors: xot

GitHub: View · Commits · Blame · Raw