Unreal Engine 5 · Blueprint → C++
Random Float in Range in Unreal Engine 5 C++
The Random Float in Range Blueprint node maps to UKismetMathLibrary::RandomFloatInRange(Min, Max), which returns a random float between Min and Max inclusive.
Blueprint node & C++ equivalent

#include "Kismet/KismetMathLibrary.h"
float Min;
float Max;
float Result = UKismetMathLibrary::RandomFloatInRange(Min, Max);What does the Random Float in Range node do?
Random Float in Range returns a pseudo-random floating-point value between a minimum and maximum bound. It is commonly used for randomized damage, spawn delays, scatter offsets, and any gameplay value that should vary each call.
The result is uniformly distributed across the [Min, Max] interval and changes every time the node executes.
The C++ equivalent
Include Kismet/KismetMathLibrary.h and call the static function UKismetMathLibrary::RandomFloatInRange(Min, Max). It returns a float and takes two float arguments, matching the Blueprint pins exactly.
If you prefer the core math library, FMath::RandRange(Min, Max) produces the same result and avoids the Kismet dependency. Both draw from the engine's global random stream.
When to use it in C++
Use RandomFloatInRange when you want quick, unseeded randomness that mirrors Blueprint behavior one-to-one. For reproducible results, seed an FRandomStream instead and call its FRandRange method so the sequence can be replayed.
Frequently asked questions
What is the C++ equivalent of Random Float in Range in UE5?+
Use UKismetMathLibrary::RandomFloatInRange(Min, Max), or the equivalent FMath::RandRange(Min, Max) from the core math library.
Is the Max value inclusive in RandomFloatInRange?+
Yes. The returned float can equal both Min and Max, and any value in between, with a uniform distribution.