SetBit

Category: Arithmetics
Since engine version: 1.0 OC

Description

Returns the new bit mask with the bit at position bit_number replaced by bit.

Syntax

int SetBit(int old_value, int bit_number, bool bit);

Parameters

old_value:
Old value of the bit masc
bit_number:
The bit to change
bit:
The new value of the bit
See also: GetBit, ToggleBit
Newton, 2009-07