RealDocs

UKismetMathLibrary::MultiplyMultiply_FloatFloat

function Engine Blueprint Since 4.0
#include "Kismet/KismetMathLibrary.h"
Access: public Specifiers: staticUFUNCTIONBlueprintPure

Description

Returns Base raised to the power of Exp (Base^Exp). Wraps std::pow and is exposed to Blueprint as the ** (Power) node.

Caveats & Gotchas

  • A negative Base with a non-integer Exp returns NaN because the mathematical result is complex. Check that Base >= 0 when the exponent can be fractional, or take the absolute value of Base and track sign separately.
  • This function takes and returns double, but in UE4 Blueprint float pins were 32-bit — code compiled against an older engine targeting UE4 float precision may see unexpected precision differences compared to UE5.

Signature

static UE_INL_API double MultiplyMultiply_FloatFloat(double Base, double Exp);

Parameters

Name Type Description Default
Base double The base value.
Exp double The exponent.

Return Type

double

Example

Scale damage exponentially with a combo multiplier C++
double BaseDamage = 50.0;
double ComboMultiplier = 1.2;
int32 ComboCount = GetComboCount();
double Damage = BaseDamage * UKismetMathLibrary::MultiplyMultiply_FloatFloat(ComboMultiplier, (double)ComboCount);

Tags

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.