Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/FGenericPlatformMath
Description
Adds two integers of any integer type, checking for overflow. If there was overflow, it returns false, and OutResult may or may not be written. If there wasn't overflow, it returns true, and the result of the addition is written to OutResult.
| Name | AddAndCheckForOverflow |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformMath.h |
| Include Path | #include "GenericPlatform/GenericPlatformMath.h" |
template<UE::CIntegral IntType>
static bool AddAndCheckForOverflow
(
IntType A,
IntType B,
IntType & OutResult
)