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

**URL:** <https://forums.unrealengine.com/t/math-fmath-kismet-math-or-maybe-standard-math-from-c/366778>\
**Category:** Community & Industry Discussion\
**Tags:** math, random, unreal-engine, question\
**Created:** [August 11, 2016, 12:05am UTC](https://forums.unrealengine.com/t/math-fmath-kismet-math-or-maybe-standard-math-from-c/366778 "2016-08-11T00:05:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_49eeb52c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_49eeb52c](https://forums.unrealengine.com/u/anonymous_user_49eeb52c)\
**Post date:** [August 11, 2016, 12:05am UTC](https://forums.unrealengine.com/t/math-fmath-kismet-math-or-maybe-standard-math-from-c/366778/1 "2016-08-11T00:05:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_bcf66e2c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_bcf66e2c](https://forums.unrealengine.com/u/anonymous_user_bcf66e2c)\
**Post date:** [August 11, 2016, 10:21am UTC](https://forums.unrealengine.com/t/math-fmath-kismet-math-or-maybe-standard-math-from-c/366778/2 "2016-08-11T10:21:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_49eeb52c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_49eeb52c](https://forums.unrealengine.com/u/anonymous_user_49eeb52c)\
**Post date:** [August 11, 2016, 5:54pm UTC](https://forums.unrealengine.com/t/math-fmath-kismet-math-or-maybe-standard-math-from-c/366778/3 "2016-08-11T17:54:58Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![eldany.uy](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/eldany.uy/32/821920_2.png) [@eldany.uy](https://forums.unrealengine.com/u/eldany.uy)\
**Post date:** [September 13, 2024, 8:05pm UTC](https://forums.unrealengine.com/t/math-fmath-kismet-math-or-maybe-standard-math-from-c/366778/4 "2024-09-13T20:05:53Z")

</div>

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?
