]> git.xonotic.org Git - xonotic/gmqcc.git/blob - tests/exponentiation.qc
f3ab7d3c4370b041b8e7e4c1a59370a1d9878b9d
[xonotic/gmqcc.git] / tests / exponentiation.qc
1 float pow(float x, float y) {
2     return __builtin_pow(x, y);
3 }
4
5 void main() {
6     float hundy = pow(10, 2); // 10^2 == 100
7     print(ftos(hundy), "\n");      // prints: 100
8
9     hundy -= 90; // 100-90 = 10
10     print(ftos(hundy ** 2), "\n"); // prints: 100
11 }