]> git.xonotic.org Git - xonotic/gmqcc.git/blob - tests/bitnot.qc
update .gitignore
[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 #ifdef __STD_FTEQCC__
10     a &~= 1; // 0
11 #else
12     a &= ~1; // 0
13 #endif
14 #ifdef __STD_GMQCC__
15     b &= ~1; // 0
16     c &= ~d; // 0
17 #else
18     b &~= 1; // 0
19     c &~= 1; // 0
20 #endif
21 #ifdef __STD_FTEQCC__
22     f &~= e; // '0 0 0'
23 #else
24     f &= ~e; // '0 0 0'
25 #endif
26 #ifdef __STD_GMQCC__
27     e &= ~e; // '0 0 0'
28 #else
29     e &~= e; // '0 0 0'
30 #endif
31
32     print("a: ", ftos(a), "\nb: ",
33                  ftos(b), "\nc: ",
34                  ftos(c), "\n");
35     print("e: ", vtos(e), "\n");
36     print("f: ", vtos(f), "\n");
37 }