FGenericPlatformMath::TruncToInt

Converts a float to an integer with truncation towards zero.

Choose your operating system:

Windows

macOS

Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformMath.h

Include

#include "GenericPlatform/GenericPlatformMath.h"

Syntax

static constexpr int32 TruncToInt
(
    float F
)

Remarks

Converts a float to an integer with truncation towards zero.

Returns

Truncated integer.

Parameters

Parameter

Description

F

Floating point value to convert