FMath::RoundFromZero

Converts a floating point number to an integer which is further from zero, "larger" in absolute value: 0.1 becomes 1, -0.1 becomes -1

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h

Include

#include "Math/UnrealMathUtility.h"

Syntax

static float RoundFromZero
(
    float F
)

Remarks

Converts a floating point number to an integer which is further from zero, "larger" in absolute value: 0.1 becomes 1, -0.1 becomes -1

Returns

The rounded integer

Parameters

Parameter

Description

F

Floating point value to convert

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss