Math, Fmath, Kismet math or maybe standard math from c++?

Hi,
I encounter a problem with choosing the right math library, just for random a couple of ints… it’s sounds funny, but I really feel confused. What’s the diference between UE4 Math llibrary, FMath library and randomizing function from Kismet? Which one I schould to use? I am totally new in unreal engine 4 world, so sorry if this is lame question.

1 Like

The kismet math functions just wrap around the FMath functions, and the FMath functions just wrap around the C++ math functions for the given OS (in most cases), so I would suggest from C++ use the FMath library, this way u can stay cross compatible if u wish to ever want to release on another OS.

Thanks. Just for the sake of clarity, ue4 FMath is wrapped c++ math, Math library is engine specific math with things like RGBvectors etc… So what’s the difference,for example, between using RandRange from RandomStream and RandRange from FMath?

I know this thread is ancient but Its interesting.

My question is, does using FMath instead of KismetMathLibrary in C++ move the needle enough to make it worth choosing FMath for better efficiency?