]> git.xonotic.org Git - xonotic/gmqcc.git/blob - tests/bitnot.qc
17ba6cd0e09dc7330caef5c33a56191de0bbbc90
[xonotic/gmqcc.git] / tests / bitnot.qc
1 void main() {
2     float a; a = 1;
3     float b; b = 1;
4     float c; c = 1;
5     float d; d = 1;
6     vector e; e = '1 1 1';
7     vector f; f = '1 1 1';
8
9     a &~= 1; // 0
10     b &= ~1; // 0
11     c &= ~d; // 0
12     f &~= e; // '0 0 0'
13     e &= ~e; // '0 0 0'
14
15     print("a: ", ftos(a), "\nb: ",
16                  ftos(b), "\nc: ",
17                  ftos(c), "\n");
18     print("e: ", vtos(e), "\n");
19     print("f: ", vtos(f), "\n");
20 }