[Closed] Using the UE4 Math API in C++
Okay so this is probably a really simple question but I'll leave it open ended so people can provide helpers for others, I'll take these and put them on the wiki in an easy to find document as searching for Math, FMath, Vector, Max etc are not the best of search terms across the board for the engine or websites.
My question is how do I do, Max() for a float in UE4 C++? Like I said if anyone wants to chime in with the usage on other math functions while theyre here please feel free.
The question has been closed Jan 30 '17 at 01:20 AM by MonsOlympus for the following reason:
The question is answered, right answer was accepted
FMath::Max() should do the trick for floats, it's a template function so should work for any type that overloads the >= operator. For 3D vectors there's FVector, for 2D vectors there's FVector2D, and for 4D vectors there's FVector4, and plenty more under Engine/Source/Runtime/Core/Public/Math.
Follow this question
Once you sign in you will be able to subscribe for any updates here