RealDocs

UKismetMathLibrary::FFloor

function Engine Blueprint Since 4.0
#include "Kismet/KismetMathLibrary.h"
Access: public Specifiers: staticBlueprintPureUFUNCTION

Description

Rounds A down towards negative infinity, returning the largest integer less than or equal to A. -1.6 becomes -2 and 1.6 becomes 1.

Caveats & Gotchas

  • Returns int32, so values outside [-2147483648, 2147483647] will overflow silently. Use FFloor64 for large values.
  • Blueprint displays this node as 'Floor' — the C++ name FFloor reflects the legacy float naming convention but the function now accepts double.

Signature

static UE_INL_API int32 FFloor(double A);

Parameters

Name Type Description Default
A double The floating-point value to floor.

Return Type

int32

Example

Floor a health regen rate to a whole number C++
double RegenRate = 3.75;
int32 WholeRegen = UKismetMathLibrary::FFloor(RegenRate); // returns 3

Tags

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.