Power of operator/function in unreal C++

First time posting on here.

I know this probably is a really simple question, but I’m trying make a mathematical expression using ‘the power of’ but I’m not sure what operator or function to use. I read that in raw C++ you can use pow() from math.h, which I tried using but didn’t have any success.

I want to do something along the lines of 4^2 = 16

You can use Pow from FMath:

FMath::Pow(4, 2); // = 16
1 Like

Oh wow, I knew it was something simple. Thanks!