{ }Blueprint → C++

Unreal Engine 5 · Blueprint → C++

Power in Unreal Engine 5 C++UE Docs

The Power Blueprint node maps to FMath::Pow(Base, Exponent) in Unreal Engine 5 C++, raising Base to the given Exponent.

Blueprint node & C++ equivalent

C++
float P = FMath::Pow(Base, Exponent);

What does the Power node do?

Power raises a base value to an exponent, returning Base multiplied by itself Exponent times. It supports fractional and negative exponents, so it covers roots and reciprocals as well as integer powers.

It is common in falloff curves, easing functions, and gameplay scaling formulas.

The C++ equivalent

Call FMath::Pow(Base, Exponent), which takes two float arguments and returns a float. It wraps the standard floating-point power function and handles non-integer exponents.

For squaring specifically, FMath::Square(Base) or simply Base * Base is faster and clearer than FMath::Pow(Base, 2.0f).

When to use it in C++

Use FMath::Pow to shape response curves, for example raising a normalized 0 to 1 input to an exponent to bias it toward one end. Avoid it in tight loops for simple integer powers, where repeated multiplication or FMath::Square is significantly cheaper.

Frequently asked questions

What is the C++ equivalent of the Power node in UE5?+

Use FMath::Pow(Base, Exponent), which raises Base to Exponent and returns a float. It accepts fractional and negative exponents.

How do you square a number efficiently in UE5 C++?+

Use FMath::Square(x) or x * x rather than FMath::Pow(x, 2.0f). Both are faster because they avoid the general power computation.

Related Math nodes

View all Math nodes →