]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/warpzone/mathlib.qc
pow(a, b) -> a ** b
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / warpzone / mathlib.qc
index e190518275b9c407570efae466fbdcb7ef758898..816a7ec6e761aa91f774a5ea8406e45b1a5775ae 100644 (file)
@@ -63,11 +63,11 @@ float tanh(float e)
 
 float exp(float e)
 {
-       return pow(M_E, e);
+       return (M_E ** e);
 }
 float exp2(float e)
 {
-       return pow(2, e);
+       return (2 ** e);
 }
 float expm1(float e)
 {
@@ -79,7 +79,7 @@ vector frexp(float e)
        vector v;
        v.z = 0;
        v.y = ilogb(e) + 1;
-       v.x = e / exp2(v.y);
+       v.x = e / (2 ** v.y);
        return v;
 }
 int ilogb(float e)
@@ -88,7 +88,7 @@ int ilogb(float e)
 }
 float ldexp(float e, int e)
 {
-       return e * pow(2, e);
+       return e * (2 ** e);
 }
 float logn(float e, float base)
 {
@@ -117,12 +117,12 @@ vector modf(float f)
 
 float scalbn(float e, int n)
 {
-       return e * pow(2, n);
+       return e * (2 ** n);
 }
 
 float cbrt(float e)
 {
-       return copysign(pow(fabs(e), 1.0/3.0), e);
+       return copysign((fabs(e) ** 1.0/3.0), e);
 }
 float hypot(float e, float f)
 {